/* UNO Rocking Robot – Oberfläche
   iPad flach auf dem Tisch, Spieler 0 = Süd (unten), Spieler 1 = Nord (oben, Zone um 180° gedreht).
   Animiert wird nur transform/opacity. */

:root {
  --red: #E8262C; --yellow: #F7D117; --green: #2FA84F; --blue: #1C6FD1;
  --ink: #15102b; --ink2: #241b45; --gold: #ffcf3a; --glass: rgba(9, 12, 36, .78);
  --fd: 'Lilita One', 'Baloo 2', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;
  --fb: 'Baloo 2', ui-rounded, 'Arial Rounded MT Bold', system-ui, sans-serif;

  /* Handkarten-Breite: Höhe = 1.527 × Breite ≈ 14.7 % der Viewport-Höhe */
  --cw: min(16.5dvh, 12.5vw);

  /* Ablage auf Rockys Kopf – Position relativ zum Robot-Bild (justierbar) */
  --tray-x: 50%;
  --tray-y: 9%;
  --tray-w: 40%;       /* Kartenbreite auf der Ablage, relativ zur Robot-Bildbreite */
  --rocky-turn: 90deg; /* Rocky liegt seitlich (Kopf → rechts): beide Spieler sehen ihn gleich */
  --rocky-feet: 98%;   /* Drehpunkt (Unterkante) im Robot-Bild */

  --zl: clamp(150px, 16vw, 220px);
  --zr: clamp(196px, 19.5vw, 270px);
  --pile-w: calc(var(--cw) * .92 + 2.2em);
  --info-w: clamp(150px, 15.5vw, 220px);
  --wip-w: clamp(34px, 3.4vw, 46px);

  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
}

html, body {
  margin: 0; height: 100%; overflow: hidden; background: #070a1c;
  overscroll-behavior: none;
}
body {
  position: fixed; inset: 0;
  touch-action: none;
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  font-family: var(--fb); color: #fff;
}
input, textarea { -webkit-user-select: text; user-select: text; touch-action: manipulation; font: inherit; }
button {
  font: inherit; color: inherit; border: 0; background: none; padding: 0; margin: 0;
  cursor: pointer; touch-action: none; -webkit-tap-highlight-color: transparent; outline: none;
}
img { -webkit-user-drag: none; user-select: none; pointer-events: none; }

.uno-root {
  position: fixed; inset: 0; height: 100dvh; overflow: hidden;
  font-size: clamp(15px, 2.2dvh, 24px);
  line-height: 1.15;
  isolation: isolate;
}

/* ---------- Tisch ---------- */
.table-bg {
  position: absolute; inset: 0; z-index: 0;
  background:
    radial-gradient(ellipse 55% 45% at 50% 50%, rgba(70, 90, 190, .28), transparent 70%),
    url(../assets/img/table.jpg) center / cover no-repeat, #0b1030;
}
.table-bg::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, .55));
}

.board {
  position: absolute; inset: 0; z-index: 1;
  display: grid; grid-template-rows: 37fr 26fr 37fr; grid-template-columns: minmax(0, 1fr);
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}
.uno-root[data-phase="setup"] .board { opacity: .25; }

/* ---------- Spieler-Zone ---------- */
.zone {
  position: relative; min-height: 0; min-width: 0;
  display: grid;
  grid-template-columns: var(--zl) minmax(0, 1fr) var(--zr);
  grid-template-rows: minmax(0, 1fr) auto;
  grid-template-areas: "left hand right" "left status right";
  padding: .35em .7em .15em;
}
.zone.north { transform: rotate(180deg); }

.zone-glow {
  position: absolute; left: 4%; right: 4%; bottom: -2px; height: 1.3em; pointer-events: none;
  border-radius: 1em 1em 0 0;
  background: linear-gradient(to top, rgba(255, 230, 90, .95), rgba(255, 200, 40, .35) 45%, transparent);
  opacity: 0; transition: opacity .35s;
}
.zone.active .zone-glow { opacity: 1; animation: edgePulse 1.4s ease-in-out infinite; }
@keyframes edgePulse { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.z-left {
  grid-area: left; position: relative; z-index: 3;
  display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start;
  gap: .45em; padding-bottom: .25em; min-height: 0;
}
.hand { grid-area: hand; position: relative; min-width: 0; min-height: 0; z-index: 2; }
.z-right {
  grid-area: right; position: relative; z-index: 3;
  display: flex; align-items: flex-end; justify-content: flex-end; gap: .55em; padding-bottom: .25em;
}
.status {
  grid-area: status; z-index: 3; text-align: center; padding: .1em .5em .2em;
  font: max(22px, 1.45em)/1.15 var(--fd); letter-spacing: .01em; color: #fff;
  text-shadow: 0 2px 0 var(--ink), 0 0 .6em rgba(0, 0, 0, .8);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.4em;
}
.zone.active .status { color: #ffe866; }

/* Namensschild */
.nameplate {
  position: relative; max-width: 100%;
  padding: .35em .8em .4em .7em; border-radius: 1em;
  background: linear-gradient(180deg, #3b3070, #1c1640);
  border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 4px 0 rgba(0, 0, 0, .45);
}
.zone.active .nameplate { background: linear-gradient(180deg, #f6c628, #e98a0c); }
.np-name {
  font: 1.45em/1.05 var(--fd); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 9em;
  -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill;
}
.np-meta { display: flex; gap: .7em; margin-top: .15em; font: 700 1.02em var(--fb); }
.np-meta span { display: inline-flex; align-items: center; gap: .25em; }
.np-count::before {
  content: ''; width: .75em; height: 1.08em; border-radius: .14em; display: inline-block;
  background: linear-gradient(135deg, var(--red) 0 50%, #111 50%); border: 2px solid #fff;
}
.np-score::before { content: '★'; color: var(--gold); }
.np-uno {
  position: absolute; right: -.9em; top: -.9em; padding: .1em .45em; border-radius: .7em;
  font: 1.1em var(--fd); background: var(--red); border: 3px solid var(--ink); color: #fff;
  -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill;
  transform: scale(0) rotate(-12deg); transition: transform .35s cubic-bezier(.3, 1.8, .5, 1);
}
.nameplate.uno .np-uno { transform: scale(1) rotate(-12deg); }

/* Mikro + Auge */
.mic-row { display: flex; align-items: center; gap: .55em; }
.mic-btn { position: relative; width: max(76px, 4.9em); height: max(76px, 4.9em); flex: none; transition: transform .12s, opacity .3s; }
.mic-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.mic-btn::before, .mic-btn::after {
  content: ''; position: absolute; inset: -8%; border-radius: 50%; pointer-events: none; opacity: 0;
}
.mic-btn[data-state="listening"]::before {
  border: .3em solid #ff4b4b; opacity: 1; animation: ringPulse 1s ease-out infinite;
}
.mic-btn[data-state="listening"] { transform: scale(1.08); }
.mic-btn[data-state="thinking"]::after {
  opacity: 1; inset: -10%;
  background: conic-gradient(from 0deg, transparent 0 55%, #7ef0ff 85%, #fff 100%);
  -webkit-mask: radial-gradient(closest-side, transparent 80%, #000 82%);
  mask: radial-gradient(closest-side, transparent 80%, #000 82%);
  animation: spin 0.9s linear infinite;
}
.mic-btn[data-state="off"] { opacity: .35; filter: grayscale(1); pointer-events: none; }
.mic-btn.pressed { transform: scale(.92); }
@keyframes ringPulse { from { transform: scale(.92); opacity: 1; } to { transform: scale(1.35); opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

.eye-btn {
  width: max(60px, 3.4em); height: max(60px, 3.4em); border-radius: 50%; flex: none; display: grid; place-items: center;
  background: radial-gradient(circle at 35% 30%, #7c8bd8, #2d2f6e 70%); border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 4px 0 rgba(0, 0, 0, .4);
  transition: transform .12s, opacity .25s;
}
.eye-btn svg { width: 64%; height: 64%; }
.eye-btn.pressed { transform: scale(.9); }
.eye-btn.hide { opacity: 0; pointer-events: none; transform: scale(.5); }

.interim {
  position: absolute; left: calc(100% - 1.5em); bottom: 5.6em; z-index: 6; width: max-content; max-width: 17em;
  padding: .4em .8em; border-radius: 1em; background: #fff; color: var(--ink);
  border: 3px solid var(--ink); font: 700 1.05em/1.15 var(--fb);
  opacity: 0; transform: scale(.6); transform-origin: 0 100%; transition: opacity .2s, transform .3s cubic-bezier(.3, 1.6, .5, 1);
  pointer-events: none;
}
.interim.show { opacity: 1; transform: scale(1); }
.interim::after {
  content: ''; position: absolute; left: .4em; bottom: -.75em; border: .45em solid transparent;
  border-top-color: var(--ink); border-left-color: var(--ink);
}

/* Knöpfe rechts */
.act-col { display: flex; flex-direction: column; gap: .45em; align-items: flex-end; }
.big-col { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.pill {
  min-height: 72px; min-width: 5.4em; padding: 0 .8em; border-radius: 36px;
  font: max(19px, 1.3em)/1 var(--fd); color: #fff; letter-spacing: .02em;
  -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill;
  background: linear-gradient(180deg, #6db4ff, var(--blue) 70%);
  border: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 5px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .35em;
  transition: transform .12s, opacity .25s;
}
.pill.green { background: linear-gradient(180deg, #6fe08d, var(--green) 70%); }
.pill.yellow { background: linear-gradient(180deg, #ffe970, #f1b800 70%); }
.pill.red { background: linear-gradient(180deg, #ff7a7e, var(--red) 70%); }
.pill.gray { background: linear-gradient(180deg, #9aa0c8, #545a8a 70%); }
.pill.pressed { transform: translateY(4px) scale(.97); box-shadow: inset 0 3px 0 rgba(255, 255, 255, .45), 0 1px 0 var(--ink); }
.pill .mini-back {
  width: .8em; height: 1.15em; border-radius: .15em; border: 2px solid #fff; flex: none;
  background: linear-gradient(135deg, var(--red) 0 50%, #111 50%);
}
.act-col .pill.btn-hide, .big-col .rbtn.btn-hide { display: none; }
.act-col .pill, .big-col .rbtn.catch { animation: popIn .3s cubic-bezier(.2, 1.4, .4, 1) both; }
.btn-hide { opacity: 0 !important; transform: scale(.5) !important; pointer-events: none !important; }

.rbtn {
  position: relative; width: var(--s, 5.4em); height: var(--s, 5.4em); flex: none;
  display: grid; place-items: center; transition: transform .14s, opacity .25s, filter .25s;
}
.rbtn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rbtn span {
  position: relative; font: var(--fs, 1.25em)/1 var(--fd); color: #fff; text-align: center;
  -webkit-text-stroke: .16em var(--ink); paint-order: stroke fill; transform: translateY(-.12em);
}
.rbtn.pressed { transform: scale(.88); }
.rbtn.off { opacity: .4; filter: grayscale(.8); pointer-events: none; }
.rbtn.uno { --s: max(88px, 5.8em); --fs: max(22px, 1.45em); }
.rbtn.catch { --s: max(74px, 4.6em); --fs: max(15px, .98em); }
.rbtn.uno.lit { animation: unoPulse .9s ease-in-out infinite; }
@keyframes unoPulse { 50% { transform: scale(1.07); } }

/* ---------- Karten ---------- */
.card {
  position: absolute; left: 0; bottom: 0;
  width: var(--cw); height: calc(var(--cw) * 1.527);
  transform-origin: 50% 100%;
  transition: transform .34s cubic-bezier(.2, .9, .25, 1.1), opacity .25s;
  container-type: inline-size;
}
.card-inner {
  position: absolute; inset: 0; border-radius: 8cqw;
  transition: transform .26s cubic-bezier(.3, 1.5, .5, 1);
  box-shadow: 0 .15em .35em rgba(0, 0, 0, .5);
}
.card.ghost { opacity: 0; transition: none; }
.card.enter .card-inner { animation: cardIn .38s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes cardIn { from { opacity: 0; transform: translateY(40%) scale(.7); } }

.face, .back { position: absolute; inset: 0; border-radius: 8cqw; overflow: hidden; }
.face-bg, .back-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.face-print { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.back-img { object-fit: contain; }
.face { background: #fff; }
.face.printed { background: transparent; overflow: visible; }
.face.printed > .face-bg, .face.printed > .c-mid { visibility: hidden; }
.card-inner:has(.face.printed), .card-inner:has(.back-img) { box-shadow: none; filter: drop-shadow(0 .12em .2em rgba(0, 0, 0, .55)); }
/* Eck-Badge über dem kleinen gedruckten Index: groß & lesbar im Fächer */
.face.printed > .c-idx {
  left: calc(var(--mx, 0%) + 3.2cqw); top: calc(var(--my, 0%) + 3.2cqw);
  min-width: 27cqw; height: 37cqw; padding: 0 1.5cqw; border-radius: 6cqw;
  background: var(--pc); box-shadow: inset 0 0 0 1.2cqw rgba(255, 255, 255, .9);
}
.face.printed > .c-idx.br { left: auto; top: auto; right: calc(var(--mx, 0%) + 3.2cqw); bottom: calc(var(--my, 0%) + 3.2cqw); }
.tray .face.printed > .c-idx { visibility: hidden; }
.back { background: radial-gradient(ellipse 40% 34% at 50% 50%, var(--red) 0 92%, transparent 95%), #111; border: 4cqw solid #fff; }

.c-mid { position: absolute; inset: 0; display: grid; place-items: center; }
.num { position: relative; display: inline-block; }
.big {
  font-family: var(--fd); font-size: 66cqw; line-height: 1; color: var(--cc);
  -webkit-text-stroke: 6cqw var(--ink); paint-order: stroke fill;
  text-shadow: 2cqw 3cqw 0 var(--ink);
  transform: translateY(3cqw);
}
.big.txt { font-size: 50cqw; letter-spacing: -1cqw; }
.num.u::after {
  content: ''; position: absolute; left: 14%; right: 14%; bottom: .02em; height: .1em;
  background: currentColor; border: .035em solid var(--ink); border-radius: .06em;
}
.big-ico { width: 64cqw; height: 64cqw; object-fit: contain; }
.sym { width: 70cqw; height: 70cqw; overflow: visible; }

.c-idx {
  position: absolute; left: 6cqw; top: 3.5cqw; display: flex; align-items: center; justify-content: center;
  min-width: 22cqw;
}
.c-idx.br { left: auto; top: auto; right: 6cqw; bottom: 3.5cqw; transform: rotate(180deg); }
.idx {
  font-family: var(--fd); font-size: 33cqw; line-height: .95; color: #fff;
  -webkit-text-stroke: 5cqw var(--ink); paint-order: stroke fill;
}
.idx.txt { font-size: 27cqw; letter-spacing: -.5cqw; }
.idx-sym { width: 27cqw; height: 27cqw; overflow: visible; }
.idx-ico { width: 26cqw; height: 26cqw; object-fit: contain; }
.wdot {
  width: 22cqw; height: 22cqw; border-radius: 50%; border: 3cqw solid var(--ink);
  background: conic-gradient(var(--red) 0 25%, var(--blue) 0 50%, var(--green) 0 75%, var(--yellow) 0);
}

/* Zustände in der Hand */
.card.can .card-inner {
  transform: translateY(-9%);
  box-shadow: 0 0 0 1.4cqw #fff, 0 0 5cqw 3cqw rgba(255, 236, 110, .95), 0 .3em .5em rgba(0, 0, 0, .55);
}
.card.twin .card-inner {
  transform: translateY(-9%);
  box-shadow: 0 0 0 1.4cqw #fff7a8, 0 0 6cqw 3.5cqw rgba(120, 220, 255, .95), 0 .3em .5em rgba(0, 0, 0, .55);
}
.card.twin::after {
  content: '⚡'; position: absolute; right: -8cqw; top: -24cqw; width: 34cqw; height: 34cqw; z-index: 3;
  display: grid; place-items: center; font-size: 22cqw; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 15%, #ffe14a 40%, #f39b00); border: 2.5cqw solid var(--ink);
  animation: twinBadge .8s ease-in-out infinite alternate;
}
@keyframes twinBadge { to { transform: scale(1.15) rotate(10deg); } }
.card.dim .card-inner { filter: brightness(.5) saturate(.6); }
.card.pick .card-inner {
  transform: translateY(-9%);
  box-shadow: 0 0 0 1.4cqw #fff, 0 0 5cqw 3cqw rgba(140, 255, 160, .95), 0 .3em .5em rgba(0, 0, 0, .55);
}

/* schwebende Karten (Drag & Flug) */
.fx { position: absolute; inset: 0; z-index: 60; pointer-events: none; overflow: hidden; }
.fx-card { left: 0; top: 0; bottom: auto; transform-origin: 50% 50%; transition: none; will-change: transform; }
.fx-card .card-inner { transition: transform .18s cubic-bezier(.3, 1.6, .5, 1); }
.fx-card.lift .card-inner {
  transform: scale(1.14);
  box-shadow: 0 0 0 1.2cqw #fff, 0 1.2em 1.6em rgba(0, 0, 0, .55), 0 0 6cqw 2cqw rgba(255, 240, 140, .8);
}
.fx-card.wait .card-inner { animation: waitPulse .5s ease-in-out infinite alternate; }
@keyframes waitPulse { from { transform: scale(1.1); } to { transform: scale(1.18); } }

/* ---------- Mitte ---------- */
.mid {
  position: relative; z-index: 4; min-height: 0;
  display: grid; grid-template-columns: var(--pile-w) minmax(0, 1fr) var(--wip-w) var(--info-w);
}
.drop-glow {
  position: absolute; inset: 3% 1%; border-radius: 45%; pointer-events: none;
  background: radial-gradient(ellipse at 50% 50%, rgba(255, 245, 160, .38), rgba(255, 210, 60, .12) 55%, transparent 72%);
  border: 4px dashed rgba(255, 240, 150, .0);
  opacity: 0; transition: opacity .25s;
}
.mid.drop-ready .drop-glow { opacity: .75; }
.mid.drop-hot .drop-glow { opacity: 1; animation: hotPulse .6s ease-in-out infinite alternate; }
@keyframes hotPulse { to { transform: scale(1.04); } }

/* Ziehstapel */
.pile { position: relative; display: grid; place-items: center; min-width: 0; }
.pile-stack {
  position: relative; width: calc(var(--cw) * .92); height: calc(var(--cw) * .92 * 1.527);
  container-type: inline-size;
}
.pile-stack .pcard {
  position: absolute; inset: 0; border-radius: 8cqw; overflow: hidden;
  transform: translate(calc(var(--i) * -1.6cqw), calc(var(--i) * -2.4cqw)) rotate(calc(var(--i) * .8deg));
  box-shadow: 0 .1em .3em rgba(0, 0, 0, .55); transition: opacity .3s;
}
.pile-stack .pcard img { width: 100%; height: 100%; object-fit: fill; }
.pile-stack .pcard.off { opacity: 0; }
.pile-stack.empty { outline: 3px dashed rgba(255, 255, 255, .3); outline-offset: -3px; border-radius: 8cqw; }
.pile-count {
  position: absolute; left: 50%; padding: .05em .6em; border-radius: 1em; z-index: 2;
  font: max(18px, 1.25em) var(--fd); background: var(--glass); border: 2px solid rgba(255, 255, 255, .25);
  transform: translateX(-50%);
}
.pile-count.s { bottom: 0; }
.pile-count.n { top: 0; transform: translateX(-50%) rotate(180deg); }

/* Rocky */
.rocky-col { position: relative; min-width: 0; container-type: size; }
.rocky-wrap { position: absolute; inset: 0; --rs: min(165cqh, 100cqw - 5em); }
.rocky-stage {
  position: absolute; left: 50%; top: 50%;
  width: var(--rs); height: var(--rs);
  margin-left: calc(var(--rs) / -2); margin-top: calc(var(--rs) / -2);
  transform: rotate(var(--rocky-turn));
}
.rk { position: absolute; inset: 0; transform-origin: 50% var(--rocky-feet); }
.rk-lean { transition: transform .9s cubic-bezier(.3, 1.55, .45, 1); }
.rk-rock { animation: rock 3s ease-in-out infinite; }
@keyframes rock { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
.uno-root.sleeping .rk-rock { animation-duration: 7s; }
.rk-bob { transition: transform .09s linear; }
.rk-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.uno-root.sleeping .rk-img { filter: brightness(.8) saturate(.85); }
.rk-eyes {
  position: absolute; left: 2%; top: -12%; width: 96%; height: 80%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, transparent 60%, var(--eye, #fff) 74%, transparent 100%);
  opacity: 0; transition: opacity .4s;
}
.rk-eyes.on { opacity: .95; animation: eyePulse 1.5s ease-in-out infinite; }
@keyframes eyePulse { 50% { transform: scale(1.06); opacity: .65; } }
.rk-zzz {
  position: absolute; right: 6%; top: 2%; font: 2.4em var(--fd); color: #bfe3ff; opacity: 0;
  -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; transform: rotate(-90deg);
}
.uno-root.sleeping .rk-zzz { animation: zzz 2.4s ease-in-out infinite; }
@keyframes zzz { 0% { opacity: 0; transform: rotate(-90deg) translate(0, 0) scale(.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: rotate(-90deg) translate(1.2em, -1em) scale(1.2); } }
.rk-hit { position: absolute; left: 14%; top: 18%; width: 72%; height: 80%; pointer-events: auto; border-radius: 40%; }

.tray {
  position: absolute; left: var(--tray-x); top: var(--tray-y); width: var(--tray-w); aspect-ratio: 1;
  transform: translate(-50%, -50%); pointer-events: auto;
}
.tray::before {
  content: ''; position: absolute; inset: -45%; border-radius: 50%; pointer-events: none;
  background: radial-gradient(closest-side, var(--active, transparent), transparent);
  opacity: .8; transition: opacity .4s;
}
.tray .card { left: 0; top: -26.35%; bottom: auto; width: 100%; height: 152.7%; transform-origin: 50% 50%; transition: none; }
.tray .card .card-inner { box-shadow: 0 .2em .5em rgba(0, 0, 0, .55); }
.tray .card.await { opacity: 0; }
.tray .card.drop .card-inner { animation: trayDrop .34s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes trayDrop { from { transform: scale(1.35); opacity: 0; } }
.tray.hint::after {
  content: ''; position: absolute; inset: -40%; border-radius: 50%; border: .35em solid #fff;
  animation: ringPulse 1.1s ease-out infinite; pointer-events: none;
}

.foot {
  position: absolute; top: 50%; right: calc(50% + var(--rs) * .43);
  transform: translateY(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4em; z-index: 2;
}
.foot .rbtn { --s: 3.7em; }
.foot .rbtn.gear { --s: 2.9em; }
.foot .rbtn.gear img { filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .5)); }

.turn-arrow {
  position: absolute; left: 50%; width: 3.2em; height: 1.6em; margin-left: -1.6em; opacity: 0;
  pointer-events: none; transition: opacity .3s; z-index: 3;
}
.turn-arrow svg { width: 100%; height: 100%; }
.turn-arrow.s { bottom: -1.1em; }
.turn-arrow.n { top: -1.1em; transform: rotate(180deg); }
.turn-arrow.on { opacity: 1; }
.turn-arrow.on svg { animation: arrowBob .8s ease-in-out infinite alternate; }
@keyframes arrowBob { to { transform: translateY(.35em); } }

/* Robo-Wippe */
.wippe { position: relative; display: flex; justify-content: center; padding: 1.2em 0; transition: opacity .3s; min-height: 0; }
.wippe.off { opacity: 0; }
.w-rail {
  position: relative; width: .95em; height: 100%; border-radius: 1em;
  background: linear-gradient(var(--red) 0 9%, #2a2f5c 9% 91%, var(--red) 91%);
  border: 3px solid var(--ink); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .14);
}
.w-rail::before {
  content: ''; position: absolute; left: -.45em; right: -.45em; top: 50%; height: 3px; margin-top: -1.5px;
  background: rgba(255, 255, 255, .6); border-radius: 2px;
}
.w-ball-wrap { position: absolute; inset: 0; transform: translateY(calc(var(--t, 0) * -41%)); transition: transform .7s cubic-bezier(.3, 1.5, .5, 1); }
.w-ball {
  position: absolute; left: 50%; top: 50%; width: 1.8em; height: 1.8em; margin: -.9em;
  border-radius: 50%; border: 3px solid var(--ink);
  background: radial-gradient(circle at 35% 30%, #fff 0 12%, #ffd84a 35%, #e07d00 85%);
}
.wippe.danger .w-ball { background: radial-gradient(circle at 35% 30%, #fff 0 12%, #ff8a8a 35%, #c4161c 85%); }
.w-ico { position: absolute; left: 50%; top: 50%; width: 2.2em; margin: -1.1em; transform: rotate(90deg); opacity: .0; }

/* Info-Leiste */
.info { display: flex; flex-direction: column; gap: .25em; padding: .35em .4em .35em .15em; min-height: 0; min-width: 0; }
.info-half {
  flex: 1 1 0; min-height: 0; display: flex; flex-wrap: wrap; align-content: center; justify-content: center;
  gap: .25em .3em; overflow: hidden; padding: .3em .35em;
  background: rgba(8, 10, 30, .55); border-radius: 1em; border: 2px solid rgba(255, 255, 255, .12);
}
.info-half.north { transform: rotate(180deg); }
.info-half:empty { visibility: hidden; }
.orb-row { flex: none; display: flex; justify-content: center; align-items: center; gap: .5em; }
.orb {
  width: 3.5em; height: 3.5em; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .85) 0 10%, rgba(255, 255, 255, 0) 38%), var(--ac, #555);
  border: 4px solid var(--ink);
  box-shadow: 0 0 1.2em .35em var(--ac, transparent), inset 0 -.35em 0 rgba(0, 0, 0, .25);
  transition: background-color .35s, box-shadow .35s, transform .35s cubic-bezier(.3, 1.8, .5, 1);
}
.orb.pop { transform: scale(1.18); }
.orb.none { opacity: .25; }
.chip {
  display: inline-flex; align-items: center; gap: .25em; max-width: 100%; pointer-events: auto;
  font: 800 1em/1.15 var(--fb); padding: .1em .45em; border-radius: .9em;
  background: rgba(255, 255, 255, .12); border: 1.5px solid rgba(255, 255, 255, .18);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chip .t { overflow: hidden; text-overflow: ellipsis; }
.chip.hot { background: rgba(232, 38, 44, .85); font: 1.2em var(--fd); border-color: #fff; }
.chip.warn { background: rgba(247, 209, 23, .9); color: var(--ink); }
.chip .cdot { width: .95em; height: .95em; border-radius: 50%; border: 2px solid #fff; flex: none; }
.chip img, .chip .emoji { width: 1.3em; height: 1.3em; object-fit: contain; flex: none; font-size: 1em; line-height: 1.3em; text-align: center; }
.ri { width: 1.45em; height: 1.45em; object-fit: contain; pointer-events: auto; display: inline-grid; place-items: center; font-size: 1.3em; line-height: 1; }
.ri-wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: .05em .15em; width: 100%; }

/* ---------- Untertitel ---------- */
.subs { position: absolute; inset: 0; z-index: 40; pointer-events: none; }
.sub {
  position: absolute; left: 50%; width: max-content; max-width: min(62vw, 30em);
  padding: .4em 1em .45em; border-radius: 1.2em; background: #fff; color: var(--ink);
  border: 4px solid var(--ink); box-shadow: 0 5px 0 rgba(0, 0, 0, .35);
  font: 800 max(22px, 1.4em)/1.2 var(--fb); text-align: center;
  opacity: 0; transition: opacity .2s, transform .35s cubic-bezier(.3, 1.6, .5, 1);
}
.sub::before {
  content: ''; position: absolute; left: 50%; top: -1.05em; margin-left: -.6em;
  border: .6em solid transparent; border-bottom-color: var(--ink);
}
.sub.s { top: calc(66% + .3em); transform: translateX(-50%) scale(.6); transform-origin: 50% 0; }
.sub.n { bottom: calc(66% + .3em); transform: translateX(-50%) rotate(180deg) scale(.6); transform-origin: 50% 100%; }
.uno-root.ev-open .sub.s { top: auto; bottom: calc(1em + var(--sab)); }
.uno-root.ev-open .sub.n { bottom: auto; top: calc(1em + var(--sat)); }
.sub.s.show { opacity: 1; transform: translateX(-50%) scale(1); }
.sub.n.show { opacity: 1; transform: translateX(-50%) rotate(180deg) scale(1); }

/* ---------- Zonen-Popups ---------- */
.zone-pop { position: absolute; inset: 0; z-index: 10; pointer-events: none; }
.zone-pop > * { pointer-events: auto; }
.pop-panel {
  position: absolute; inset: .25em .5em; border-radius: 1.4em;
  background: rgba(9, 11, 34, .9); border: 3px solid rgba(255, 255, 255, .2);
  box-shadow: 0 .4em 1.2em rgba(0, 0, 0, .5);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em;
  padding: .4em .8em;
  animation: popIn .32s cubic-bezier(.2, 1.4, .4, 1) both;
}
.pop-panel.out { animation: popOut .2s ease-in both; }
@keyframes popIn { from { opacity: 0; transform: scale(.8) translateY(15%); } }
@keyframes popOut { to { opacity: 0; transform: scale(.9); } }
.pop-title {
  font: 1.6em/1.1 var(--fd); text-align: center; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill;
}
.pop-sub { font: 700 1.05em/1.2 var(--fb); opacity: .85; text-align: center; }
.choose-row { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; max-width: 100%; }
.choice {
  min-height: 3.6em; min-width: 7em; padding: .3em 1em; border-radius: 1.2em;
  font: 1.25em/1.05 var(--fd); color: #fff; -webkit-text-stroke: .12em var(--ink); paint-order: stroke fill;
  background: linear-gradient(180deg, #7a6fe0, #463ab0 75%); border: 3px solid var(--ink);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .4), 0 5px 0 var(--ink);
  display: inline-flex; align-items: center; justify-content: center; gap: .4em; transition: transform .12s;
}
.choice.col { background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .7) 0 8%, transparent 40%), var(--c); }
.choice.pressed { transform: translateY(4px) scale(.96); }
.choice-ico { width: 1.7em; height: 1.7em; object-fit: contain; }
.choose.colors .choose-row { gap: 1em; flex-wrap: nowrap; }
.choose.colors .choice {
  width: 5.6em; height: 5.6em; min-width: 0; border-radius: 50%; padding: 0; font-size: 1.15em;
  border-width: 4px; box-shadow: inset 0 -.4em 0 rgba(0, 0, 0, .25), 0 6px 0 var(--ink), 0 0 1em var(--c);
}

.pick-banner {
  position: absolute; left: 50%; top: .2em; transform: translateX(-50%);
  display: flex; align-items: center; gap: .7em; max-width: 92%;
  padding: .35em .5em .35em 1em; border-radius: 1.2em;
  background: rgba(9, 11, 34, .92); border: 3px solid #8dffa8;
  animation: popIn .3s cubic-bezier(.2, 1.4, .4, 1) both;
}
.pick-banner .pop-title { font-size: 1.3em; }
.pick-banner .pill { font-size: 1.05em; min-height: 2.6em; }

.toast-stack { position: absolute; left: 50%; top: 3.4em; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: .3em; pointer-events: none !important; z-index: 12; }
.toast {
  padding: .35em 1em; border-radius: 1.2em; font: max(20px, 1.35em)/1.15 var(--fd); max-width: 60vw; text-align: center;
  background: linear-gradient(180deg, #ffe970, #f1b800); color: var(--ink); border: 3px solid var(--ink);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .4);
}

.cd {
  position: absolute; left: calc(var(--zl) - 2.2em); top: .3em; width: 4em; height: 4em; z-index: 11;
  pointer-events: none; animation: popIn .3s both;
}
.cd svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cd .cd-bg { fill: rgba(9, 11, 34, .9); stroke: rgba(255, 255, 255, .2); stroke-width: 8; }
.cd .cd-fg { fill: none; stroke: #7dff9a; stroke-width: 9; stroke-linecap: round; }
.cd.low .cd-fg { stroke: #ff5050; }
.cd.low { animation: cdPulse .5s ease-in-out infinite alternate; }
@keyframes cdPulse { to { transform: scale(1.12); } }
.cd b { position: absolute; inset: 0; display: grid; place-items: center; font: 1.6em var(--fd); }

.rec-panel .rec-btn { position: relative; width: 6.5em; height: 6.5em; transition: transform .12s; }
.rec-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.rec-btn.rec { transform: scale(1.08); }
.rec-btn.rec::before { content: ''; position: absolute; inset: -6%; border-radius: 50%; border: .35em solid #ff4b4b; animation: ringPulse 1s ease-out infinite; }
.lvl { width: 12em; height: .8em; border-radius: 1em; background: rgba(255, 255, 255, .15); overflow: hidden; border: 2px solid var(--ink); }
.lvl i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--yellow), var(--red)); transform-origin: 0 50%; transform: scaleX(0); transition: transform .08s linear; }
.rec-row { display: flex; align-items: center; gap: 1em; }

/* ---------- Overlays ---------- */
.overlays { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.overlays > * { pointer-events: auto; }
.ov3 {
  position: absolute; inset: 0; display: grid; grid-template-rows: 37fr 26fr 37fr; pointer-events: none !important;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}
.ov3 > .half { pointer-events: auto; }
.half { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .4em; padding: .4em 1em; min-height: 0; }
.half.north { grid-row: 1; transform: rotate(180deg); }
.half.south { grid-row: 3; }
.half.panel { background: rgba(7, 9, 30, .88); border-radius: 1.6em; margin: .3em .6em; border: 3px solid rgba(255, 255, 255, .16); animation: popIn .35s cubic-bezier(.2, 1.4, .4, 1) both; }

/* Ereigniskarte */
.ev-ov {
  position: absolute; inset: 0; display: grid; grid-template-rows: 1fr auto 1fr; justify-items: center; align-items: center;
  background: radial-gradient(ellipse at center, rgba(0, 0, 0, .35), rgba(0, 0, 0, .7)); pointer-events: none !important;
  animation: fadeIn .25s both;
}
.ev-ov.out { animation: fadeOut .25s both; }
@keyframes fadeIn { from { opacity: 0; } }
@keyframes fadeOut { to { opacity: 0; } }
.ev-card {
  position: relative; height: min(50dvh, 58vw * 1.5); aspect-ratio: 840 / 1260; container-type: inline-size;
  animation: evIn .6s cubic-bezier(.2, 1.3, .35, 1) both;
  filter: drop-shadow(0 1em 1.4em rgba(0, 0, 0, .6));
}
@keyframes evIn { from { transform: scale(.2) rotate(-200deg); opacity: 0; } }
.ev-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; }
.ev-banner {
  position: absolute; left: 12%; right: 12%; top: 4.5%; height: 9%; display: grid; place-items: center;
  font: 9cqw/1 var(--fd); color: #fff; text-align: center; -webkit-text-stroke: 1.6cqw var(--ink); paint-order: stroke fill;
  white-space: nowrap;
}
.ev-emoji { position: absolute; inset: 30% 0 auto; text-align: center; font-size: 34cqw; }
.ev-text {
  max-width: min(80vw, 34em); text-align: center; padding: .4em 1.1em; border-radius: 1.2em;
  background: rgba(255, 255, 255, .96); color: var(--ink); border: 4px solid var(--ink);
  font: 800 1.35em/1.2 var(--fb); animation: popIn .4s .2s cubic-bezier(.2, 1.4, .4, 1) both;
}
.ev-text b { display: block; font: 1.15em var(--fd); }
.ev-text.north { transform: rotate(180deg); align-self: end; margin-bottom: .6em; }
.ev-text.south { align-self: start; margin-top: .6em; }
.ev-text:empty { display: none; }

/* Duell */
.duel-title { font: 1.7em/1 var(--fd); -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; }
.duel-hint { font: 800 1.05em/1.2 var(--fb); opacity: .9; text-align: center; }
.duel-row { display: flex; align-items: center; gap: 1.2em; }
.duel-btn { position: relative; width: 7em; height: 7em; transition: transform .08s; }
.duel-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.duel-btn span { position: absolute; inset: 0; display: grid; place-items: center; font: 1.3em var(--fd); -webkit-text-stroke: .14em var(--ink); paint-order: stroke fill; transform: translateY(-.15em); }
.duel-btn.down { transform: scale(.88); }
.duel-state { font: 2em/1 var(--fd); min-width: 3em; text-align: center; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; }
.duel-bar { width: 14em; height: 1em; border-radius: 1em; overflow: hidden; background: rgba(255, 255, 255, .14); border: 3px solid var(--ink); }
.duel-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--yellow), var(--red)); transform-origin: 0 50%; transform: scaleX(0); transition: transform .08s; }
.half.win { background: rgba(26, 120, 50, .92); }
.half.lose { background: rgba(140, 20, 24, .9); }
.flash { position: absolute; inset: 0; border-radius: inherit; opacity: 0; pointer-events: none; background: var(--fc, #fff); }
.duel-center {
  grid-row: 2; position: relative; pointer-events: none; display: grid; place-items: center;
}
.duel-ring {
  width: min(36dvh, 40vw); aspect-ratio: 1; border-radius: 50%; border: 1.2em solid var(--fc, transparent);
  opacity: 0; transition: opacity .12s; box-shadow: 0 0 2em var(--fc, transparent), inset 0 0 2em var(--fc, transparent);
}
.duel-ring.on { opacity: 1; }

/* Gewinner */
.win-big { display: flex; align-items: flex-end; gap: .5em; }
.win-big img.trophy { height: 5.2em; animation: trophy 1.2s ease-in-out infinite alternate; }
.win-big img.crown { height: 2.8em; transform: rotate(-12deg); }
@keyframes trophy { to { transform: translateY(-.25em) rotate(4deg) scale(1.05); } }
.win-name { font: 2.3em/1 var(--fd); color: var(--gold); -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; text-align: center; }
.win-score { font: 1.5em var(--fd); display: flex; gap: .6em; align-items: center; }
.win-hint { font: 800 1.1em var(--fb); padding: .25em .9em; border-radius: 1em; background: rgba(255, 255, 255, .14); }
.half.loser .win-big img.trophy { height: 3.2em; filter: grayscale(.4); }

/* ---------- Setup ---------- */
.setup {
  position: absolute; inset: 0; z-index: 25; overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(20, 24, 70, .5), rgba(4, 5, 18, .92)), url(../assets/img/table.jpg) center / cover;
  padding: var(--sat) var(--sar) var(--sab) var(--sal);
}
.dual { position: absolute; inset: 0; display: grid; grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
.dual.c3 { grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr); }
.dual > .side { position: relative; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5em; padding: .6em 1em; }
.dual > .side.north { transform: rotate(180deg); }
.dual > .side.north { border-bottom: 2px dashed rgba(255, 255, 255, .12); }
.su-title { font: max(30px, 1.9em)/1.05 var(--fd); text-align: center; -webkit-text-stroke: .1em var(--ink); paint-order: stroke fill; }
.su-sub { font: 700 max(24px, 1.4em)/1.2 var(--fb); opacity: .9; text-align: center; max-width: 30em; }
.su-mid { display: flex; flex-direction: column; align-items: center; gap: 1.2dvh; padding: .4em; }
.su-rocky { width: 45dvh; height: 45dvh; position: relative; transform: rotate(var(--rocky-turn)); margin: -3dvh 0; }
.su-rocky img { width: 100%; height: 100%; object-fit: contain; }
.su-rocky.boot img { animation: boot 1.2s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes boot { 0% { transform: scale(.85) rotate(-8deg); } 40% { transform: scale(1.1) rotate(6deg); } 100% { transform: none; } }
.setup .dual.c3 > .side { gap: .3em; }
.setup .dual.c3 .su-title { font-size: max(32px, 2.2em); }

.switch {
  position: relative; width: max(280px, 17em); height: max(112px, 6.6em); border-radius: 60px; touch-action: none; flex: none;
  background: linear-gradient(180deg, #22264f, #121530); border: 5px solid var(--ink);
  box-shadow: inset 0 .4em .8em rgba(0, 0, 0, .6), 0 .3em 0 rgba(255, 255, 255, .08);
}
.switch .lbl { position: absolute; top: 50%; font: max(40px, 2.4em) var(--fd); transform: translateY(-50%); opacity: .55; }
.switch .lbl.o { left: 1.1em; color: #ff8b8b; }
.switch .lbl.i { right: 1.1em; color: #8dffa8; }
.switch .knob {
  position: absolute; left: 7px; top: 7px; width: calc(max(112px, 6.6em) - 24px); height: calc(max(112px, 6.6em) - 24px); border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff 0 10%, #ff6b6f 30%, var(--red) 70%);
  border: 4px solid var(--ink); box-shadow: 0 .3em .5em rgba(0, 0, 0, .5);
  transition: transform .35s cubic-bezier(.3, 1.5, .5, 1), background .3s;
}
.switch.on .knob { background: radial-gradient(circle at 35% 30%, #fff 0 10%, #7dffa0 30%, var(--green) 70%); }
.switch.drag .knob { transition: none; }

.su-row { display: flex; gap: .7em; align-items: center; justify-content: center; flex-wrap: wrap; }
.su-input {
  width: 10em; min-height: 72px; padding: .15em .6em; border-radius: .8em; border: 4px solid var(--ink); background: #fff; color: var(--ink);
  font: max(32px, 1.9em) var(--fd); text-align: center; outline: none;
}
.su-input:focus { box-shadow: 0 0 0 .2em var(--yellow); }
.su-input.small { font-size: max(20px, 1.2em); width: 16em; font-family: var(--fb); font-weight: 800; }
.hold-btn { position: relative; width: max(84px, 5em); height: max(84px, 5em); flex: none; transition: transform .12s; }
.hold-btn img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.hold-btn.rec { transform: scale(1.1); }
.hold-btn.rec::before { content: ''; position: absolute; inset: -8%; border-radius: 50%; border: .3em solid #ff4b4b; animation: ringPulse 1s ease-out infinite; }
.hold-btn.saved::after { content: '✓'; position: absolute; right: -.2em; bottom: -.1em; width: 1.4em; height: 1.4em; border-radius: 50%; background: var(--green); border: 3px solid var(--ink); display: grid; place-items: center; font: 1em var(--fd); }
.ready-tag { font: max(26px, 1.5em) var(--fd); color: #8dffa8; }

.rules-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .5em; width: min(100%, 76em); }
.rcard {
  position: relative; min-width: 0; min-height: 72px; padding: .35em .3em .4em; border-radius: .9em;
  background: linear-gradient(180deg, #2f2a62, #19163a); border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .18), 0 3px 0 rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .15em; text-align: center;
  transition: transform .15s, filter .2s;
  filter: grayscale(.85) brightness(.72);
}
.rcard.on { background: linear-gradient(180deg, #ffd84a, #f39b00); color: var(--ink); filter: none; }
.rcard.pressed { transform: scale(.95); }
.rcard img, .rcard .emoji { width: 3.4em; height: 3.4em; max-height: 7dvh; object-fit: contain; font-size: 2em; line-height: 1.3; }
.rcard .rn { font: max(18px, 1.15em)/1.05 var(--fd); }
.rcard .chk {
  position: absolute; right: -.45em; top: -.45em; width: 1.6em; height: 1.6em; border-radius: 50%;
  display: grid; place-items: center; font: 1em var(--fd); background: var(--green); color: #fff; border: 3px solid var(--ink);
  transform: scale(0); transition: transform .25s cubic-bezier(.3, 1.8, .5, 1);
}
.rcard.on .chk { transform: scale(1); }
.su-detail {
  flex: 1; min-height: 72px; max-width: 46em; display: block; padding: .35em .8em; border-radius: 1em; text-align: left;
  font: 700 max(19px, 1.15em)/1.2 var(--fb); background: rgba(255, 255, 255, .1); border: 2px solid rgba(255, 255, 255, .15);
}
.su-detail b { font-family: var(--fd); font-weight: 400; margin-right: .35em; color: var(--gold); }
.hr-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .4em; width: min(100%, 64em); }
.hr-card {
  padding: .3em .5em; border-radius: .8em; min-height: 72px; display: grid; place-items: center;
  font: 800 max(18px, 1.12em)/1.12 var(--fb); text-align: center;
  background: linear-gradient(180deg, #ff9a3c, #e8622c); border: 3px solid var(--ink); color: #fff;
  box-shadow: 0 4px 0 rgba(0, 0, 0, .4); transition: transform .12s;
}
.hr-card.sel { background: linear-gradient(180deg, #8dffa8, var(--green)); color: var(--ink); transform: scale(1.05); box-shadow: 0 0 0 .2em #fff, 0 4px 0 rgba(0, 0, 0, .4); }
.hr-card.pressed { transform: scale(.95); }
.seg { display: flex; border-radius: 1.2em; overflow: hidden; border: 3px solid var(--ink); }
.seg button { padding: .3em 1.1em; min-height: 68px; font: max(24px, 1.4em) var(--fd); background: #2b2860; color: #fff; }
.seg button + button { border-left: 3px solid var(--ink); }
.seg button.on { background: linear-gradient(180deg, #ffe970, #f1b800); color: var(--ink); }
.opt-row { display: grid; grid-template-columns: 7em auto; align-items: center; gap: .6em; }
.opt-row > span { font: max(24px, 1.4em) var(--fd); text-align: right; }
.pill.big { font-size: max(34px, 2em); min-height: 96px; padding: 0 1.6em; border-radius: 48px; }

/* Konfetti */
.confetti { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }

/* ---------- Hochformat: kompakter ---------- */
@media (orientation: portrait) {
  .uno-root { font-size: clamp(12px, 1.55vw, 20px); }
  :root { --zl: clamp(130px, 22vw, 220px); --zr: clamp(150px, 25vw, 260px); --info-w: clamp(150px, 26vw, 300px); }
  .pill { min-width: 4.8em; }
  .rules-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .hr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-height: 700px) and (orientation: landscape) {
  .rcard .rt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .rk-rock { animation: none; }
}

/* ---------- Vollbild-Knopf (rechter Rand, Tischmitte – für beide Spieler erreichbar) ---------- */
.fs-btn {
  position: fixed; z-index: 9000; right: calc(.5em + var(--sar)); top: 50%; transform: translateY(-50%);
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(180deg, #3b3070, #1c1640); border: 3px solid var(--ink);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .25), 0 4px 0 rgba(0, 0, 0, .45);
}
.fs-btn svg { width: 34px; height: 34px; fill: none; stroke: #fff; stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.fs-btn:active { transform: translateY(-50%) scale(.92); }
.fs-btn[hidden] { display: none; }
