/* Handy-Controller */
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body.phone { min-height: 100dvh; overscroll-behavior: none; user-select: none; -webkit-user-select: none; }
.pscreen { position: relative; z-index: 2; min-height: 100dvh; }
input { font: inherit; }

/* Beitreten */
#scr-join { padding: 1rem 1rem calc(1.5rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; max-width: 30rem; margin: 0 auto; }
.join-top { display: flex; justify-content: flex-end; }
.join-hero { text-align: center; margin: .8rem 0 1.2rem; }
.hero-seal { font-size: 4.4rem; margin: 0 auto .6rem; animation: stamp-in .9s var(--ease-bounce) both; }
@keyframes stamp-in { 0% { transform: scale(3) rotate(-25deg); opacity: 0; } 60% { transform: scale(.92) rotate(6deg); opacity: 1; } 100% { transform: scale(1) rotate(-8deg); } }
.join-hero h1 { margin: 0; font-size: 2.3rem; line-height: 1; color: var(--parch); text-shadow: 0 2px 0 var(--brass-dk); }
.join-form { padding: 1.2rem; display: flex; flex-direction: column; gap: .9rem; animation: rise .6s var(--ease-out); }
.join-form label { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.join-form input { border: 0; border-radius: 12px; padding: .8rem 1rem; font-size: 1.25rem; font-weight: 700; color: var(--ink); background: #fffaf0; box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .2); }
.join-form input:focus { outline: none; box-shadow: inset 0 0 0 3px var(--brass); }
#in-code { text-transform: uppercase; letter-spacing: .3em; font-family: var(--font-display); font-size: 1.8rem; text-align: center; }
.av-label { font-weight: 700; font-size: .9rem; color: var(--ink-soft); }
.av-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: .45rem; }
.av-grid button { aspect-ratio: 1; border: 0; border-radius: 50%; font-size: 1.6rem; background: rgba(42, 26, 18, .08); transition: transform .15s; }
.av-grid button.on { background: var(--blood); box-shadow: 0 0 0 3px var(--brass); transform: scale(1.1); }
.av-grid button:disabled { opacity: .25; }
.join-err { min-height: 1.2em; margin: 0; color: var(--blood); font-weight: 700; }

/* Kopf */
#scr-game { display: flex; flex-direction: column; }
.phead { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: .6rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; background: linear-gradient(180deg, rgba(10, 20, 15, .96), rgba(19, 36, 29, .9)); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.me-btn { display: flex; align-items: center; gap: .6rem; border: 0; background: none; color: var(--text); padding: 0; text-align: left; min-width: 0; }
.me-btn .medal { width: 2.6rem; height: 2.6rem; font-size: 1.45rem; }
.me-text { display: flex; flex-direction: column; min-width: 0; }
.me-text b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9rem; }
.phead-right { display: flex; align-items: center; gap: .5rem; }
.lang-switch.small button { padding: .3em .6em; font-size: .75rem; }
.dossier-btn { border: 0; background: rgba(242, 227, 194, .1); width: 2.6rem; height: 2.6rem; border-radius: 12px; font-size: 1.3rem; }
.pbar { height: 4px; background: rgba(0, 0, 0, .3); }
#pbar-fill { height: 100%; width: 0; background: var(--brass); transition: width .25s linear; }
.pbar.urgent #pbar-fill { background: var(--blood-hi); }

.view { flex: 1; padding: 1rem 1rem calc(6rem + env(safe-area-inset-bottom)); max-width: 34rem; width: 100%; margin: 0 auto; }
.view > * { animation: fade-in .35s ease-out both; }
.h2 { font-family: var(--font-display); font-weight: 400; font-size: 1.7rem; margin: .2rem 0 .8rem; line-height: 1.1; }
.sub { color: var(--text-dim); margin: 0 0 1rem; line-height: 1.4; }
.center { text-align: center; }
.card-box { padding: 1.2rem; border-radius: 16px; background: rgba(0, 0, 0, .28); box-shadow: inset 0 0 0 1px rgba(217, 164, 65, .25); }

/* Warten */
.wait-hero { text-align: center; padding: 2rem 0 1rem; }
.wait-hero .medal { width: 7rem; height: 7rem; font-size: 4rem; margin: 0 auto 1rem; animation: float 3s ease-in-out infinite; }
.big-emoji { font-size: 4.5rem; text-align: center; margin: 1.5rem 0 .5rem; animation: float 3s ease-in-out infinite; }
.lobby-av { margin-top: 1.4rem; }

/* Rollenkarte */
.role-card { perspective: 1200px; margin: 1rem auto; width: min(19rem, 86vw); aspect-ratio: 3 / 4.2; cursor: pointer; }
.role-inner { position: relative; width: 100%; height: 100%; transition: transform .8s var(--ease-out); transform-style: preserve-3d; }
.role-card.open .role-inner { transform: rotateY(180deg); }
.role-face { position: absolute; inset: 0; backface-visibility: hidden; border-radius: 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1.4rem; text-align: center; }
.role-back { background: linear-gradient(160deg, #3a1520, #1d0a10); box-shadow: inset 0 0 0 3px var(--brass), inset 0 0 0 7px #3a1520, inset 0 0 0 8px var(--brass-dk), 0 16px 40px rgba(0, 0, 0, .5); color: var(--parch); }
.role-back .seal { font-size: 6rem; margin-bottom: 1.2rem; }
.role-front { transform: rotateY(180deg); }
.role-front .re { font-size: 5rem; }
.role-front h3 { font-family: var(--font-display); font-weight: 400; font-size: 2rem; margin: .5rem 0; color: var(--blood); line-height: 1; }
.role-front p { margin: 0; line-height: 1.4; }

/* Klausel */
.clause-paper { padding: 1.3rem 1.3rem 1.6rem; position: relative; }
.clause-paper b { font-family: var(--font-display); font-weight: 400; color: var(--blood); font-size: 1.2rem; }
.clause-paper p { font-size: 1.25rem; line-height: 1.35; font-weight: 500; margin: .5rem 0 0; }
.clause-paper .seal { position: absolute; right: -.4rem; bottom: -.6rem; font-size: 3rem; transform: rotate(-8deg); }
.now-list { margin-top: .8rem; display: flex; flex-direction: column; gap: .4rem; }
.now-list div { padding: .5rem .7rem; border-radius: 10px; background: rgba(0, 0, 0, .3); font-weight: 600; }
.look-tv { margin-top: 1.4rem; text-align: center; font-weight: 700; color: var(--brass-hi); font-size: 1.1rem; }

/* Planung */
.section-title { font-weight: 800; font-size: .95rem; margin: 1.2rem 0 .5rem; color: var(--text-dim); display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; }
.section-title small { font-weight: 500; }
.rooms { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.room-btn {
  --tone: var(--brass);
  border: 0; border-radius: 14px; padding: .8rem .7rem; text-align: left; color: var(--text); position: relative;
  background: linear-gradient(180deg, color-mix(in srgb, var(--tone) 35%, #1c160f), #1c160f);
  box-shadow: inset 0 0 0 2px rgba(217, 164, 65, .35);
  transition: transform .15s, box-shadow .2s;
  display: flex; flex-direction: column; gap: .2rem;
}
.room-btn .re { font-size: 1.8rem; line-height: 1; }
.room-btn .rn { font-family: var(--font-display); font-size: 1.15rem; line-height: 1.05; }
.room-btn .rd { font-size: .72rem; line-height: 1.3; color: var(--text-dim); }
.room-btn.on { box-shadow: inset 0 0 0 3px var(--brass-hi), 0 0 22px rgba(243, 207, 122, .45); transform: scale(1.02); }
.room-btn.on::after { content: '✓'; position: absolute; right: .5rem; top: .45rem; width: 1.6rem; height: 1.6rem; border-radius: 50%; display: grid; place-items: center; background: var(--brass-hi); color: var(--ink); font-weight: 800; }
.room-btn:disabled { opacity: .35; filter: grayscale(1); }
.hand { display: flex; gap: .6rem; overflow-x: auto; padding: .3rem .1rem .8rem; scroll-snap-type: x mandatory; }
.pcard {
  flex: none; width: 8.6rem; border: 0; border-radius: 12px; padding: .7rem .6rem; scroll-snap-align: start; text-align: center; color: var(--ink);
  background: linear-gradient(160deg, #fff6df, var(--parch-2));
  box-shadow: inset 0 0 0 2px var(--brass), inset 0 0 0 4px #fff6df, inset 0 0 0 5px var(--brass-dk), 0 6px 14px rgba(0, 0, 0, .35);
  transition: transform .2s var(--ease-bounce), box-shadow .2s; display: flex; flex-direction: column; align-items: center; gap: .25rem;
}
.pcard .ce { font-size: 2rem; }
.pcard .cn { font-weight: 800; font-size: .9rem; line-height: 1.1; }
.pcard .cd { font-size: .7rem; line-height: 1.3; color: var(--ink-soft); }
.pcard .ct { font-size: .72rem; font-weight: 800; color: var(--blood); }
.pcard.on { transform: translateY(-8px) rotate(-2deg); box-shadow: inset 0 0 0 2px var(--blood), inset 0 0 0 4px #fff6df, inset 0 0 0 5px var(--blood), 0 0 0 3px var(--brass-hi), 0 14px 24px rgba(0, 0, 0, .45); }
.pcard:disabled { opacity: .4; }
.empty-note { color: var(--text-dim); font-style: italic; margin: .2rem 0; }
.sticky-cta { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; padding: .8rem 1rem calc(.8rem + env(safe-area-inset-bottom)); background: linear-gradient(0deg, rgba(10, 20, 15, .98) 60%, transparent); display: flex; justify-content: center; }
.sticky-cta .btn { width: min(32rem, 100%); }
.ghost-note { padding: .9rem 1rem; border-radius: 14px; background: rgba(143, 227, 208, .12); box-shadow: inset 0 0 0 1px rgba(143, 227, 208, .4); color: var(--ghost); line-height: 1.4; }
.summary { text-align: center; padding: 1.4rem 1rem; }
.summary .se { font-size: 4rem; animation: pop-in .6s var(--ease-bounce); }
.summary .st { font-family: var(--font-display); font-size: 1.8rem; margin: .4rem 0; }
.summary p { margin: .3rem 0; color: var(--text-dim); }

/* Ziel-Blatt */
.sheet { position: fixed; inset: 0; z-index: 50; display: flex; flex-direction: column; justify-content: flex-end; }
.sheet-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .6); animation: fade-in .25s; }
.sheet-body { position: relative; max-height: 82dvh; overflow: auto; border-radius: 22px 22px 0 0; padding: 1.2rem 1rem calc(1.2rem + env(safe-area-inset-bottom)); animation: sheet-up .35s var(--ease-out); }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
.sheet-body h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.5rem; margin: 0 0 .8rem; }
.pick-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
.pick { border: 0; border-radius: 14px; padding: .7rem .3rem; background: rgba(42, 26, 18, .08); color: var(--ink); display: flex; flex-direction: column; align-items: center; gap: .35rem; font-weight: 700; font-size: .85rem; }
.pick .medal { width: 3rem; height: 3rem; font-size: 1.7rem; }
.pick.on { background: var(--blood); color: var(--parch); }
.pick .pn { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet .btn { margin-top: 1rem; width: 100%; }
.dossier h4 { margin: 1.1rem 0 .4rem; font-size: .95rem; color: var(--ink-soft); }
.dossier .row { display: flex; align-items: center; gap: .7rem; padding: .5rem 0; border-bottom: 1px solid rgba(42, 26, 18, .12); }
.dossier .row .e { font-size: 1.6rem; width: 2.2rem; text-align: center; }
.dossier .row small { display: block; color: var(--ink-soft); }
.dossier .role-big { display: flex; gap: .9rem; align-items: center; padding: .8rem; border-radius: 14px; background: rgba(140, 35, 49, .1); }
.dossier .role-big .e { font-size: 3rem; }
.dossier .role-big b { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; color: var(--blood); }

/* Duell-Minispiele */
.duel-head { text-align: center; }
.duel-head .dn { font-family: var(--font-display); font-size: 2rem; color: var(--brass-hi); }
.duel-head p { color: var(--text-dim); margin: .3rem 0 0; }
.tap-zone { margin: 1.4rem auto 0; width: min(17rem, 72vw); aspect-ratio: 1; border-radius: 50%; border: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 2.6rem; color: var(--parch); background: radial-gradient(circle at 40% 35%, #c64458, var(--blood) 60%, #5a1220); box-shadow: 0 10px 0 #3d0b14, 0 18px 40px rgba(0, 0, 0, .5), inset 0 0 0 6px rgba(255, 255, 255, .08); touch-action: manipulation; }
.tap-zone:active { transform: translateY(6px) scale(.98); box-shadow: 0 4px 0 #3d0b14, 0 10px 20px rgba(0, 0, 0, .5); }
.tap-count { text-align: center; font-family: var(--font-display); font-size: 3.2rem; color: var(--brass-hi); margin-top: 1rem; }
.react-zone { margin: 1.2rem 0 0; height: 52dvh; border-radius: 22px; border: 0; width: 100%; font-family: var(--font-display); font-size: 2.8rem; color: white; background: #7a1020; box-shadow: inset 0 0 60px rgba(0, 0, 0, .4); touch-action: manipulation; transition: background .05s; }
.react-zone.go { background: #2f9d4c; }
.react-zone.done { background: #3a3a3a; font-size: 1.6rem; }
.estimate-q { padding: 1.1rem; font-size: 1.25rem; font-weight: 700; line-height: 1.35; margin: 1rem 0; }
.estimate-in { width: 100%; border: 0; border-radius: 14px; padding: 1rem; font-size: 2rem; font-weight: 800; text-align: center; background: #fffaf0; color: var(--ink); }
.estimate-in:focus { outline: 3px solid var(--brass); }
.watch { font-family: var(--font-display); font-size: 5rem; text-align: center; margin: 1.6rem 0 1rem; color: var(--parch); font-variant-numeric: tabular-nums; }
.watch.hidden-digits { color: var(--text-dim); animation: pulse 1s infinite; }
.duel-res { text-align: center; padding: 1.4rem 0; }
.duel-res .e { font-size: 5rem; animation: pop-in .6s var(--ease-bounce); }
.duel-res .t { font-family: var(--font-display); font-size: 2.2rem; }
.duel-res p { color: var(--text-dim); }

/* Ergebnis */
.delta-big { font-family: var(--font-display); font-size: 4.4rem; text-align: center; margin: 1rem 0 .4rem; animation: pop-in .6s var(--ease-bounce); }
.lines { display: flex; flex-direction: column; gap: .45rem; margin-top: 1rem; }
.lines div { padding: .55rem .8rem; border-radius: 10px; background: rgba(0, 0, 0, .28); font-weight: 600; font-size: .95rem; animation: rise .4s var(--ease-out) both; }
.lines div.pos { box-shadow: inset 4px 0 0 #3c9a52; } .lines div.neg { box-shadow: inset 4px 0 0 var(--blood-hi); }
.secret { margin-top: 1.2rem; padding: 1rem; text-align: center; font-weight: 800; font-size: 1.1rem; animation: pop-in .6s .4s var(--ease-bounce) both; }

/* Abstimmung */
.vote-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: 1rem; }
.vote-list .pick { background: rgba(0, 0, 0, .28); color: var(--text); box-shadow: inset 0 0 0 1px rgba(217, 164, 65, .25); }
.vote-list .pick.on { background: var(--blood); box-shadow: inset 0 0 0 2px var(--brass-hi); }
.fv-q { margin-top: 1.4rem; }
.fv-q h3 { font-family: var(--font-display); font-weight: 400; font-size: 1.4rem; margin: 0; }

/* Finale */
.final-rank { text-align: center; padding: 1.4rem 0; }
.final-rank .rn { font-family: var(--font-display); font-size: 5rem; color: var(--brass-hi); line-height: 1; animation: pop-in .7s var(--ease-bounce); }
.final-rank .money { font-size: 1.8rem; display: inline-block; margin-top: .5rem; }

.toast { position: fixed; left: 50%; bottom: calc(6rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 60; padding: .7rem 1.2rem; border-radius: 12px; font-weight: 700; color: var(--ink); background: var(--parch); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: rise .3s var(--ease-out); max-width: 90vw; text-align: center; }
.conn { position: fixed; top: 0; left: 0; right: 0; z-index: 70; padding: .6rem; text-align: center; font-weight: 700; background: var(--blood); color: var(--parch); }

/* Geistermodus */
body.is-ghost .phead { background: linear-gradient(180deg, rgba(20, 45, 42, .97), rgba(25, 55, 50, .9)); }
body.is-ghost .me-btn .medal { animation: float 2.4s ease-in-out infinite; }

/* ================= Neu: Porträt, Chat, Minispiele ================= */
.linkish { border: 0; background: none; color: var(--ink-soft); text-decoration: underline; font-weight: 600; padding: .4rem; align-self: center; }
.join-photo, .join-emoji { display: flex; flex-direction: column; align-items: center; gap: .7rem; }
.join-photo .av-label, .join-emoji .av-label { align-self: stretch; }
.join-emoji .av-grid { align-self: stretch; }
.portrait-btn {
  width: 9.5rem; height: 9.5rem; border-radius: 50%; border: 0; padding: 0; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 40% 35%, #fff8e6, var(--parch-2));
  box-shadow: 0 0 0 4px var(--brass), 0 0 0 7px #6e4c1c, 0 10px 24px rgba(0, 0, 0, .35);
}
.portrait-btn img { width: 100%; height: 100%; object-fit: cover; }
.portrait-ph { font-size: 3.4rem; opacity: .6; }

.hbtn { border: 0; background: rgba(242, 227, 194, .1); color: var(--text); width: 2.6rem; height: 2.6rem; border-radius: 12px; font-size: 1.25rem; position: relative; display: grid; place-items: center; }
.badge { position: absolute; top: -.35rem; right: -.35rem; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--blood-hi); color: white; font-size: .72rem; font-weight: 800; font-style: normal; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--wall); animation: pop-in .3s var(--ease-bounce); }
.badge.hidden { display: none; }

.medal.huge { width: 7.5rem; height: 7.5rem; font-size: 4.2rem; margin: 0 auto; }
.medal.tiny { width: 1.9rem; height: 1.9rem; font-size: 1.05rem; box-shadow: 0 0 0 2px var(--c); display: inline-grid; vertical-align: middle; }
.wait-hero .medal.huge { animation: float 3s ease-in-out infinite; margin-bottom: 1rem; }
.fam-row { display: flex; gap: .4rem; justify-content: center; flex-wrap: wrap; }
.opp-row { display: flex; justify-content: center; gap: 1.2rem; margin-top: 1.2rem; flex-wrap: wrap; }
.opp { display: flex; flex-direction: column; align-items: center; gap: .4rem; font-weight: 700; }
.opp .medal { width: 4.4rem; height: 4.4rem; font-size: 2.4rem; }
.rank-line { display: flex; align-items: center; gap: .5rem; }
.dossier .row .medal.tiny { margin: 0 .2rem; }

/* Porträt-Studio */
.photo-modal { position: fixed; inset: 0; z-index: 80; overflow: auto; background: radial-gradient(ellipse at center, rgba(20, 38, 31, .98), rgba(6, 12, 9, .99)); animation: fade-in .25s; }
.photo-inner { max-width: 26rem; margin: 0 auto; padding: calc(1rem + env(safe-area-inset-top)) 1rem calc(1.5rem + env(safe-area-inset-bottom)); display: flex; flex-direction: column; align-items: center; text-align: center; gap: .7rem; }
.photo-inner h2 { margin: .3rem 0 0; font-size: 1.7rem; color: var(--parch); }
.photo-inner .sub { margin: 0; }
.photo-inner .small { font-size: .85rem; }
.cam-stage { position: relative; width: min(72vw, 17rem); aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #0c1511;
  box-shadow: 0 0 0 5px var(--brass), 0 0 0 9px #6e4c1c, 0 0 0 11px var(--brass-dk), 0 18px 40px rgba(0, 0, 0, .6); }
.cam-stage video, .cam-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cam-stage video { transform: scaleX(-1); }
.cam-stage video.flt-live-oil { filter: sepia(.85) contrast(1.15) saturate(1.2) brightness(1.03); }
.cam-stage video.flt-live-ghost { filter: grayscale(1) brightness(1.2) sepia(.3) hue-rotate(130deg); }
.cam-stage video.flt-live-noir { filter: grayscale(1) contrast(1.6); }
.cam-stage video.flt-live-gold { filter: saturate(1.15) sepia(.15); }
.cam-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: inset 0 0 40px rgba(0, 0, 0, .55); pointer-events: none; }
.cam-placeholder { position: absolute; inset: 0; display: grid; place-items: center; font-size: 4rem; opacity: .5; }
.cam-placeholder.hidden { display: none; }
.cam-count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--font-display); font-size: 6rem; color: white; text-shadow: 0 4px 20px rgba(0, 0, 0, .7); pointer-events: none; }
.cam-count.go { animation: count-pop .7s var(--ease-out); }
@keyframes count-pop { from { transform: scale(1.8); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.8); opacity: .2; } }
.cam-flash { position: absolute; inset: 0; background: white; opacity: 0; pointer-events: none; }
.cam-flash.go { animation: flash-out .5s ease-out; }
@keyframes flash-out { from { opacity: 1; } to { opacity: 0; } }
.flt-row { display: flex; gap: .45rem; overflow-x: auto; max-width: 100%; padding: .3rem .1rem; }
.flt { flex: none; border: 0; border-radius: 999px; padding: .35rem .75rem .35rem .4rem; display: flex; align-items: center; gap: .4rem; font-size: .85rem; font-weight: 700; color: var(--text); background: rgba(242, 227, 194, .1); }
.flt.on { background: var(--parch); color: var(--ink); }
.fs { width: 1.3rem; height: 1.3rem; border-radius: 50%; display: inline-block; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .2); }
.fs-normal { background: linear-gradient(135deg, #f4c7a1, #7cb3e6); }
.fs-oil { background: linear-gradient(135deg, #e9b46a, #6b3c16); }
.fs-ghost { background: linear-gradient(135deg, #d9fff6, #5aa79a); }
.fs-noir { background: linear-gradient(135deg, #eee, #111); }
.fs-gold { background: radial-gradient(circle, #f4c7a1 50%, #e6b450 52%); }
.cam-actions { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.cam-actions .hidden { display: none; }
.cam-alt { display: flex; gap: 1rem; justify-content: center; }
.cam-alt .linkish { color: var(--text-dim); }

/* Chat */
.chat { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: linear-gradient(180deg, #102019, #0b1611); animation: sheet-up .3s var(--ease-out); }
.chat-head { display: flex; align-items: center; gap: .6rem; padding: calc(.6rem + env(safe-area-inset-top)) .8rem .6rem; background: rgba(0, 0, 0, .35); box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.chat-title { flex: 1; font-family: var(--font-display); font-size: 1.3rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-body { flex: 1; overflow-y: auto; padding: .9rem; display: flex; flex-direction: column; gap: .5rem; }
.thread-list { display: flex; flex-direction: column; gap: .4rem; }
.thread { border: 0; display: flex; align-items: center; gap: .75rem; padding: .6rem .7rem; border-radius: 14px; color: var(--text); text-align: left; background: rgba(242, 227, 194, .06); position: relative; }
.thread .medal { width: 2.8rem; height: 2.8rem; font-size: 1.5rem; }
.thread .tt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.thread small { color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thread .badge { position: static; }
.fam-medal { font-size: 1.4rem !important; }
.chat-note { text-align: center; color: var(--text-dim); font-size: .8rem; margin: 0 0 .4rem; }
.chat-empty { text-align: center; color: var(--text-dim); font-style: italic; margin-top: 2rem; }
.bubble-row { display: flex; align-items: flex-end; gap: .4rem; animation: rise .25s var(--ease-out); }
.bubble-row.mine { justify-content: flex-end; }
.bubble { max-width: 78%; padding: .55rem .8rem; border-radius: 16px 16px 16px 4px; background: rgba(242, 227, 194, .12); line-height: 1.35; word-wrap: break-word; }
.bubble b { display: block; font-size: .75rem; color: var(--brass-hi); }
.bubble-row.mine .bubble { border-radius: 16px 16px 4px 16px; background: var(--parch); color: var(--ink); }
.chat-form { display: flex; gap: .5rem; padding: .6rem .8rem calc(.6rem + env(safe-area-inset-bottom)); background: rgba(0, 0, 0, .35); }
.chat-form.hidden { display: none; }
.chat-form input { flex: 1; border: 0; border-radius: 999px; padding: .75rem 1rem; font: inherit; font-size: 1rem; background: #fffaf0; color: var(--ink); }
.chat-form .btn { border-radius: 999px; padding: .7rem 1.1rem; }

/* Minispiele */
.mini-status { font-weight: 800; font-size: 1.15rem; margin: .8rem 0 .2rem; }
.simon { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; width: min(80vw, 20rem); margin: 1rem auto 0; }
.pad { aspect-ratio: 1; border: 0; border-radius: 22px; opacity: .45; transition: opacity .1s, transform .1s; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.pad.lit { opacity: 1; transform: scale(1.05); box-shadow: 0 0 30px 6px rgba(255, 255, 255, .35), inset 0 -6px 0 rgba(0, 0, 0, .25); }
.pad-red { background: #e0525a; } .pad-blue { background: #4a90e2; } .pad-green { background: #4fb25c; } .pad-yellow { background: #f0c93b; }
.math-q { font-family: var(--font-display); font-size: 3rem; text-align: center; margin: 1.2rem 0 .8rem; }
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.choice { border: 0; border-radius: 16px; padding: 1.1rem 0; font-size: 1.8rem; font-weight: 800; color: var(--ink); background: var(--parch); box-shadow: 0 5px 0 var(--brass-dk); }
.choice:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brass-dk); }
.choice.bad { background: var(--bad); animation: shake .4s; }
.balloon-stage { height: 15rem; display: grid; place-items: end center; margin-top: .6rem; overflow: visible; }
.balloon { font-size: 5rem; transition: transform .12s var(--ease-bounce); transform-origin: bottom center; }
.balloon.wobble { animation: wobble .25s infinite; }
.balloon.popped { animation: pop-in .3s; }
@keyframes wobble { 0%, 100% { rotate: -3deg; } 50% { rotate: 3deg; } }
.two-btn { display: flex; gap: .7rem; justify-content: center; margin-top: .6rem; }
.two-btn .btn { flex: 1; }
.stroop { font-family: var(--font-display); font-size: 3.6rem; text-align: center; margin: 1.6rem 0; text-shadow: 0 2px 0 rgba(0, 0, 0, .4); }
.stroop.pop, .arrow-big.pop { animation: pop-in .2s var(--ease-bounce); }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.cbtn { border: 0; height: 5.2rem; border-radius: 18px; box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .25); }
.cbtn:active { transform: scale(.96); }
.mole-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: .7rem; margin-top: 1rem; }
.hole { aspect-ratio: 1; border: 0; border-radius: 50%; background: radial-gradient(ellipse at 50% 70%, #0b0805 45%, #3a2a1a 47%, #2a1d12); overflow: hidden; position: relative; }
.hole .mole { position: absolute; left: 0; right: 0; bottom: -100%; font-size: 2.8rem; transition: bottom .12s ease-out; }
.hole.up .mole { bottom: 12%; }
.hole.hit { animation: shake .2s; }
.coin-field { position: relative; height: 20rem; border-radius: 18px; margin-top: 1rem; background: radial-gradient(ellipse at center, #3a2a1a, #1c160f); box-shadow: inset 0 0 0 2px var(--brass); overflow: hidden; }
.coin { position: absolute; font-size: 1.7rem; }
.coin-gone { position: absolute; inset: 0; display: grid; place-items: center; font-size: 5rem; }
.safe-dial { font-size: 5rem; text-align: center; margin: 1rem 0 .2rem; }
.safe-dial.spin { animation: spin .4s ease-out; }
.safe-form { display: flex; gap: .6rem; margin-top: .6rem; }
.safe-form .estimate-in { flex: 1; }
.odd-grid { display: grid; gap: .4rem; margin-top: 1rem; }
.odd { aspect-ratio: 1; border: 0; border-radius: 12px; font-size: 1.8rem; background: rgba(242, 227, 194, .1); }
.odd.bad { background: var(--blood); animation: shake .3s; }
.arrow-big { font-size: 6rem; text-align: center; margin: 1rem 0 0; }
.arrow-big.rev { filter: drop-shadow(0 0 10px #ff5a5a) hue-rotate(-40deg); }
#ah { min-height: 1.4em; color: var(--bad); font-weight: 800; margin: .2rem 0; }
.arrow-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; width: min(78vw, 18rem); margin: .6rem auto 0; }
.abtn { aspect-ratio: 1; border: 0; border-radius: 18px; font-size: 2.4rem; background: var(--parch); box-shadow: 0 5px 0 var(--brass-dk); }
.abtn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--brass-dk); }
.num-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin-top: 1rem; }
.num { aspect-ratio: 1; border: 0; border-radius: 16px; font-family: var(--font-display); font-size: 1.8rem; color: var(--ink); background: var(--parch); box-shadow: 0 5px 0 var(--brass-dk); }
.num.on { background: var(--blood); color: var(--parch); }

/* Sitzung beendet */
.ended-view { animation: rise .5s var(--ease-out); }
.rank-line.me { background: rgba(217, 164, 65, .22); box-shadow: inset 0 0 0 1px var(--brass); }

/* Familienwahl */
.fam-box { margin-top: 1rem; }
.fam-pick { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.fam-opt { border: 0; border-radius: 14px; padding: .7rem .5rem; color: var(--text); display: flex; flex-direction: column; align-items: center; gap: .3rem;
  background: color-mix(in srgb, var(--fc) 16%, rgba(0, 0, 0, .3)); box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--fc) 55%, transparent); transition: transform .15s; }
.fam-opt.on { box-shadow: inset 0 0 0 3px var(--fc), 0 0 18px color-mix(in srgb, var(--fc) 60%, transparent); transform: scale(1.03); }
.fam-opt .fn { font-family: var(--font-display); font-size: 1.05rem; line-height: 1.1; text-align: center; }
.fam-opt small { color: var(--text-dim); }
.fam-crest { width: 2.6rem; height: 2.6rem; border-radius: 50% 50% 46% 46% / 40% 40% 60% 60%; display: grid; place-items: center; font-size: 1.5rem; background: radial-gradient(circle at 40% 30%, #fff8e6, var(--parch-2)); box-shadow: 0 0 0 3px var(--fc), 0 4px 10px rgba(0, 0, 0, .4); }

/* ================= Update 4: Wetten, Sabotage, Selfies, Verträge, Auktion, Plot-Twists, Awards ================= */
.wanted-note { display: flex; align-items: center; gap: .6rem; margin: .4rem 0 .2rem; padding: .7rem .9rem; border-radius: 12px; font-weight: 700; font-size: .92rem;
  background: repeating-linear-gradient(-45deg, rgba(217, 164, 65, .18) 0 10px, rgba(217, 164, 65, .08) 10px 20px); box-shadow: inset 0 0 0 2px var(--brass); animation: rise .5s var(--ease-out) both; }
.wanted-note.me { background: repeating-linear-gradient(-45deg, rgba(184, 56, 74, .35) 0 10px, rgba(184, 56, 74, .18) 10px 20px); box-shadow: inset 0 0 0 2px var(--blood-hi); animation: rise .5s var(--ease-out) both, pulse 1.6s 0.6s ease-in-out infinite; }
.wanted-note .medal { width: 2.2rem; height: 2.2rem; font-size: 1.2rem; }

.bet-box, .sab-box { margin-top: 1rem; animation: rise .45s var(--ease-out) both; }
.bet-box .section-title, .sab-box .section-title { margin-top: 0; color: var(--brass-hi); }
.bet-who { display: grid; grid-template-columns: repeat(auto-fit, minmax(5.4rem, 1fr)); gap: .6rem; }
.bet-who .pick { background: rgba(0, 0, 0, .28); color: var(--text); box-shadow: inset 0 0 0 1px rgba(217, 164, 65, .25); }
.bet-who .pick.on { background: var(--blood); box-shadow: inset 0 0 0 2px var(--brass-hi); transform: scale(1.04); }
.bet-placed { display: flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.05rem; }
.chip-row { display: flex; gap: .45rem; overflow-x: auto; padding: .7rem 0 .4rem; scrollbar-width: none; }
.chip-row.wrap { flex-wrap: wrap; overflow: visible; }
.chip { border: 0; border-radius: 999px; padding: .55rem .85rem; font: inherit; font-weight: 700; font-size: .88rem; white-space: nowrap; color: var(--text);
  background: rgba(242, 227, 194, .1); box-shadow: inset 0 0 0 1px rgba(242, 227, 194, .25); transition: transform .15s var(--ease-bounce); }
.chip.on { background: var(--brass); color: var(--ink); box-shadow: none; transform: scale(1.06); }
.chip:active { transform: scale(.94); }
.bet-box > .btn { width: 100%; margin-top: .5rem; }
.sab-btns { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin-top: .8rem; }
.sab-btn { border: 0; border-radius: 16px; padding: .7rem .2rem .5rem; display: flex; flex-direction: column; align-items: center; gap: .2rem; color: var(--text); font: inherit;
  background: radial-gradient(circle at 50% 30%, rgba(242, 227, 194, .16), rgba(0, 0, 0, .3)); box-shadow: 0 4px 0 rgba(0, 0, 0, .4); touch-action: manipulation; }
.sab-btn span { font-size: 2.1rem; line-height: 1; }
.sab-btn small { font-size: .72rem; font-weight: 700; color: var(--text-dim); }
.sab-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.sab-btn:disabled { opacity: .35; }
.sab-btn.thrown span { animation: throw-up .6s var(--ease-out); }
@keyframes throw-up { 0% { transform: none; } 50% { transform: translateY(-60px) rotate(200deg) scale(1.4); opacity: .4; } 51% { transform: translateY(20px); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* Sabotage-Effekte auf dem Handy der Duellanten */
.sab-layer { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.splat { position: absolute; width: 9rem; height: 9rem; margin: -4.5rem 0 0 -4.5rem; display: grid; place-items: center; animation: splat-life 3.2s ease-in forwards; }
.splat::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 50% 50%, #e3242b 0 34%, transparent 35%), radial-gradient(circle at 20% 30%, #c81d25 0 12%, transparent 13%), radial-gradient(circle at 80% 25%, #d82029 0 10%, transparent 11%), radial-gradient(circle at 75% 80%, #c81d25 0 14%, transparent 15%), radial-gradient(circle at 25% 78%, #e3242b 0 9%, transparent 10%); filter: drop-shadow(0 4px 6px rgba(0, 0, 0, .4)); }
.splat span { position: relative; font-size: 2.2rem; }
@keyframes splat-life { 0% { transform: scale(2.6); opacity: 0; } 8% { transform: scale(.9); opacity: 1; } 14% { transform: scale(1.05); } 75% { transform: translateY(30px) scale(1); opacity: .95; } 100% { transform: translateY(90px) scale(1, 1.3); opacity: 0; } }
body.sab-quake #view { animation: shake .18s linear infinite; }
body.sab-fog #view { filter: blur(5px) contrast(.8); transition: filter .4s; }
body.sab-fog .sab-layer { background: radial-gradient(circle at 50% 50%, rgba(220, 220, 220, .55), rgba(180, 180, 180, .3)); animation: fade-in .4s; }
body.sab-flip #view { transform: rotate(180deg); transition: transform .5s var(--ease-bounce); }
#view { transition: transform .5s var(--ease-bounce), filter .4s; }

/* Selfie-Abstimmung */
.selfie-list { grid-template-columns: repeat(2, 1fr); }
.selfie-img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 12px; box-shadow: 0 0 0 3px var(--brass), 0 8px 18px rgba(0, 0, 0, .5); background: #2a2016; }
.selfie-list .pick { padding: .5rem; }
.selfie-list .pick.on .selfie-img { box-shadow: 0 0 0 4px var(--brass-hi), 0 0 24px rgba(243, 207, 122, .6); }

/* Plot-Twist */
.twist-head { text-align: center; margin-top: .6rem; }
.tw-badge { display: inline-block; padding: .35rem 1rem; border-radius: 6px; font-family: var(--font-display); font-size: 1.3rem; letter-spacing: .06em; color: var(--ink);
  background: linear-gradient(90deg, var(--brass), var(--brass-hi), var(--brass)); transform: rotate(-4deg); animation: stamp-in .7s var(--ease-out) both; }
.tw-e { font-size: 5rem; margin: .6rem 0 .2rem; animation: pop-in .7s .2s var(--ease-bounce) both, float 3s 1s ease-in-out infinite; }
.twist-head.small .tw-e { font-size: 3rem; }
.tw-raid { font-weight: 800; color: var(--bad); font-size: 1.15rem; animation: pulse 1s ease-in-out infinite; }
.hide-rooms .room-btn { min-height: 4.5rem; }
.tap-zone.dig { position: relative; overflow: visible; background: radial-gradient(circle at 40% 35%, #c08a4a, #7a4f22 60%, #3e2810); box-shadow: 0 10px 0 #2b1a0b, 0 18px 40px rgba(0, 0, 0, .5); }
.dirt { position: absolute; left: 50%; top: 30%; font-size: 2rem; animation: dirt-fly .9s var(--ease-out) forwards; pointer-events: none; }
@keyframes dirt-fly { from { transform: translate(-50%, 0) scale(.5); opacity: 1; } to { transform: translate(calc(-50% + var(--dx, 40px)), -140px) scale(1.3) rotate(220deg); opacity: 0; } }
.lines div.me { box-shadow: inset 0 0 0 2px var(--brass-hi); }
.role-swap .re { font-size: 3.6rem; margin: .4rem 0; animation: pop-in .6s .6s var(--ease-bounce) both; }
.role-swap p { font-weight: 500; font-size: .92rem; }

/* Auktion */
.center-title { justify-content: center; color: var(--brass-hi); font-size: 1.2rem; }
.auction-item { text-align: center; margin: .4rem 0 .6rem; }
.ai-e { font-size: 5.4rem; display: inline-block; filter: drop-shadow(0 0 22px rgba(243, 207, 122, .55)); animation: pop-in .6s var(--ease-bounce) both, float 3s .6s ease-in-out infinite; }
.bid-display { text-align: center; font-size: 2.8rem; margin: .6rem 0 0; }
.bid-display .money { display: inline-block; }
.bid-display .money.pop { animation: pop-in .25s var(--ease-bounce); }
.chip-row:has([data-d]) { justify-content: center; }

/* Verträge */
.deals h4 { margin: 1rem 0 .5rem; font-size: .95rem; }
.deals .wide { width: 100%; margin: .2rem 0 .8rem; }
.deal { padding: .8rem; border-radius: 14px; background: rgba(42, 26, 18, .08); margin-bottom: .6rem; box-shadow: inset 4px 0 0 var(--ink-soft); animation: rise .35s var(--ease-out) both; }
.deal.st-open { box-shadow: inset 4px 0 0 var(--brass); }
.deal.st-accepted { box-shadow: inset 4px 0 0 #3c9a52; }
.deal.st-broken { box-shadow: inset 4px 0 0 #5fbf3f; background: rgba(95, 191, 63, .12); }
.deal.st-declined, .deal.st-cancelled, .deal.st-failed { opacity: .55; }
.deal-top { display: flex; align-items: center; gap: .5rem; }
.deal-top b { flex: 1; }
.deal-st { font-size: .8rem; font-weight: 800; text-transform: uppercase; color: var(--ink-soft); }
.deal ul { margin: .5rem 0 .4rem; padding-left: 1.2rem; font-size: .92rem; }
.deal .two-btn { margin-top: .4rem; }
.btn.ink { color: var(--ink); box-shadow: inset 0 0 0 2px rgba(42, 26, 18, .25); background: transparent; width: 100%; margin-top: .3rem; }
.btn.accuse { color: var(--blood); font-size: .9rem; white-space: normal; }
.deal-form .pick.on { background: var(--blood); color: var(--parch); }
.deal-form .chip { color: var(--ink); background: rgba(42, 26, 18, .08); box-shadow: inset 0 0 0 1px rgba(42, 26, 18, .2); white-space: normal; text-align: left; }
.deal-form .chip.on { background: var(--blood); color: var(--parch); }
.money-row { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1rem; }
.money-row label { display: flex; flex-direction: column; gap: .3rem; font-weight: 700; font-size: .85rem; }
.money-row input, #dl-own { font: inherit; font-size: 1.1rem; padding: .6rem .7rem; border-radius: 10px; border: 2px solid rgba(42, 26, 18, .25); background: rgba(255, 255, 255, .55); color: var(--ink); width: 100%; }
#dl-own { margin-top: .5rem; }
.deal-form #dl-send { width: 100%; margin-top: 1rem; }

/* Awards */
.my-awards { margin-top: 1rem; }
.my-awards .section-title { margin-top: 0; color: var(--brass-hi); }
.award-row { display: flex; align-items: center; gap: .8rem; padding: .5rem 0; animation: rise .5s var(--ease-out) both; }
.award-row + .award-row { border-top: 1px solid rgba(217, 164, 65, .2); }
.aw-e { font-size: 2.2rem; filter: drop-shadow(0 0 10px rgba(243, 207, 122, .5)); }
.award-row small { display: block; color: var(--text-dim); }
.prank-note { font-size: 1rem; }

.secret.clue small { display: block; font-size: .8rem; font-weight: 600; opacity: .7; margin-bottom: .3rem; }
