/* 8 Nov 2026 — game chooser + ״אליאס של שלווה״ (alias.js). Same gold background, team bar and
   cream-and-gold buttons as the cake screens. */
.alias-screen {
  --ink: #3a1d0c; --ink-soft: #7a5530; --gold: #d8a63c;
  --u: min(1vw, 1.45dvh);
  position: fixed; inset: 0; z-index: 70; overflow: hidden;
  background: #f3dcb5 url(assets/round/background-gold.jpg) center / cover no-repeat;
  color: var(--ink); font-family: Arial, "Arial Hebrew", sans-serif;
  display: flex; flex-direction: column; align-items: center;
  padding: max(10px, env(safe-area-inset-top)) 16px max(12px, env(safe-area-inset-bottom));
  animation: alias-in .35s ease both;
}
@keyframes alias-in { from { opacity: 0; } to { opacity: 1; } }
body.alias-open { overflow: hidden; }
/* soft turning beams behind everything, like the cake screens */
.alias-screen::before {
  content: ''; position: absolute; left: 50%; top: 52%; width: max(170vw, 170vh); aspect-ratio: 1; z-index: 0; pointer-events: none;
  transform: translate(-50%, -50%);
  background: repeating-conic-gradient(from 0deg, rgba(255, 222, 140, .42) 0deg 7deg, rgba(255, 222, 140, 0) 7deg 20deg);
  -webkit-mask-image: radial-gradient(closest-side, #000 10%, rgba(0,0,0,.6) 40%, transparent 72%);
  mask-image: radial-gradient(closest-side, #000 10%, rgba(0,0,0,.6) 40%, transparent 72%);
  animation: alias-rays 70s linear infinite;
}
@keyframes alias-rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
.alias-screen > * { position: relative; z-index: 1; }

/* ---------- team bar ---------- */
.alias-bar {
  width: min(100%, 760px); flex: none; display: grid; grid-template-columns: 1fr 1fr; gap: 6px;
  padding: 8px 12px; border-radius: 22px; background: linear-gradient(#fffaf0, #f7e8c9);
  border: 4px solid var(--gold); box-shadow: 0 0 0 3px #f6dc94, 0 6px 18px rgba(120, 70, 10, .3), inset 0 2px 0 #fff;
}
.alias-team { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 10px; border-radius: 14px; min-width: 0; transition: background .3s; }
.alias-team.second { flex-direction: row-reverse; }
.alias-team.active { background: rgba(240, 196, 100, .35); box-shadow: inset 0 0 0 2px rgba(216, 166, 60, .7); }
.alias-team-name { font-weight: 900; font-size: clamp(15px, 3.6 * var(--u), 26px); line-height: 1.1; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.alias-team-score { display: flex; align-items: baseline; gap: 2px; font-weight: 900; white-space: nowrap; }
.alias-team-score b { font-size: clamp(24px, 6 * var(--u), 44px); color: #6b3b0e; display: inline-block; }
.alias-team-score small { font-size: clamp(13px, 2.6 * var(--u), 18px); color: var(--ink-soft); }
.alias-team-score b.bump { animation: alias-bump .45s ease; }
@keyframes alias-bump { 40% { transform: scale(1.45); color: #c47a12; } }

/* ---------- cards ---------- */
.alias-center { flex: 1; width: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 0; padding: 12px 0; overflow-y: auto; }
.alias-eyebrow { font-weight: 800; letter-spacing: 1px; color: #8a5a10; font-size: clamp(14px, 2.8 * var(--u), 19px); text-align: center; }
.alias-title { margin: 6px 0 14px; font-size: clamp(28px, 7 * var(--u), 50px); line-height: 1.1; font-weight: 900; text-align: center; color: #5a2e0a; text-wrap: balance;
  text-shadow: 0 2px 0 #fff6e0, 0 0 18px rgba(255, 240, 200, .9); }
.alias-card {
  width: min(100%, 620px); padding: clamp(18px, 4 * var(--u), 32px); border-radius: 30px; text-align: center;
  background: linear-gradient(#fffdf7, #f8ebd0); border: 4px solid var(--gold);
  box-shadow: 0 0 0 3px #f6dc94, 0 14px 34px rgba(110, 60, 10, .3), inset 0 2px 0 #fff;
  animation: alias-card-in .45s cubic-bezier(.2, .9, .3, 1.2) both;
}
@keyframes alias-card-in { from { opacity: 0; transform: translateY(24px) scale(.96); } }
.alias-rules { text-align: right; margin: 0 0 18px; padding-right: 22px; font-size: clamp(16px, 3.4 * var(--u), 22px); line-height: 1.45; font-weight: 700; }
.alias-rules li { margin: 6px 0; }
.alias-sub { font-size: clamp(17px, 3.6 * var(--u), 24px); font-weight: 700; margin: 0 0 18px; }
.alias-primary, .alias-secondary, .alias-hit, .alias-skip {
  display: flex; align-items: center; justify-content: center; width: 100%; min-height: 62px; margin: 10px 0 0; padding: 10px 18px;
  border-radius: 999px; font: 900 clamp(20px, 4.4 * var(--u), 30px)/1.15 Arial, "Arial Hebrew", sans-serif; color: var(--ink); cursor: pointer;
  background: linear-gradient(#fffdf7, #f6e7ca); border: 3px solid var(--gold);
  box-shadow: inset 0 3px 0 #fff, 0 5px 14px rgba(110, 70, 20, .28); touch-action: manipulation;
}
.alias-primary { background: linear-gradient(#ffe7a6, #f2bf5c); border-color: #c98d22; }
.alias-primary:active, .alias-secondary:active, .alias-hit:active, .alias-skip:active { transform: scale(.97); }
.alias-text { background: none; border: 0; margin-top: 12px; font-weight: 700; color: var(--ink-soft); text-decoration: underline; font-size: 17px; cursor: pointer; }

/* ---------- chooser ---------- */
.alias-choices { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(12px, 3 * var(--u), 26px); width: min(100%, 860px); }
@media (orientation: portrait) and (max-width: 640px) { .alias-choices { grid-template-columns: 1fr; } }
.alias-choice {
  display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 16px 20px; border-radius: 32px; cursor: pointer;
  background: linear-gradient(#fffdf7, #f6e7ca); border: 4px solid var(--gold); color: var(--ink);
  box-shadow: 0 0 0 3px #f6dc94, 0 14px 30px rgba(110, 60, 10, .28), inset 0 2px 0 #fff;
  font-family: inherit; text-align: center; transition: transform .2s; animation: alias-card-in .5s cubic-bezier(.2, .9, .3, 1.2) both;
}
.alias-choice.choice-alias { animation-delay: .12s; }
.alias-choice:active { transform: scale(.97); }
.alias-choice b { font-size: clamp(22px, 5 * var(--u), 36px); font-weight: 900; line-height: 1.1; }
.alias-choice small { font-size: clamp(14px, 2.9 * var(--u), 19px); font-weight: 700; color: var(--ink-soft); line-height: 1.35; }
.ac-art { height: clamp(120px, 28 * var(--u), 230px); width: 100%; display: flex; align-items: flex-end; justify-content: center; position: relative; }
.ac-art img { height: 100%; width: auto; object-fit: contain; filter: drop-shadow(0 8px 10px rgba(110, 60, 10, .3)); }
.ac-art.balloons img { position: absolute; height: 78%; bottom: 8%; left: calc(50% + (var(--i) - 1) * 28%); transform: translateX(-50%) rotate(calc((var(--i) - 1) * 8deg)); transform-origin: 50% 100%;
  animation: alias-bob 3s ease-in-out calc(var(--i) * -1s) infinite alternate; }
.ac-art.balloons img:nth-child(2) { height: 90%; z-index: 1; }
@keyframes alias-bob { to { translate: 0 -6%; } }

/* ---------- playing ---------- */
.alias-play .alias-style {
  margin-top: 12px; padding: 8px 22px; border-radius: 999px; font-weight: 900; font-size: clamp(18px, 4.2 * var(--u), 28px);
  background: #6b3b0e; color: #fff3d6; box-shadow: 0 6px 16px rgba(80, 40, 5, .35); border: 3px solid #f2c94c;
}
.alias-play .alias-style small { font-weight: 700; opacity: .8; font-size: .75em; margin-left: 4px; }
.alias-play .alias-style.in { animation: alias-style-in .5s cubic-bezier(.2, .9, .3, 1.4) both; }
@keyframes alias-style-in { from { opacity: 0; transform: scale(.6) rotate(-4deg); } }
.alias-sky { flex: 1; width: 100%; position: relative; min-height: 0; }
.alias-balloon {
  position: absolute; left: 50%; top: 50%; height: min(58%, 62 * var(--u)); display: flex; flex-direction: column; align-items: center; cursor: pointer;
  transform: translate(-50%, -50%); animation: alias-rise 1.5s linear both;
  -webkit-tap-highlight-color: transparent;
}
.alias-balloon > img { height: 100%; width: auto; max-width: 86vw; object-fit: contain; animation: alias-sway 3s ease-in-out -1.5s infinite alternate both;
  transform-origin: 50% 100%; filter: drop-shadow(0 10px 12px rgba(110, 60, 10, .3)); }
/* 8 Nov 2026: one flowing motion — the sway runs from the first frame (while still rising), and the rise
   eases into the middle with a soft overshoot and settle instead of stopping on a hard edge */
@keyframes alias-rise {
  0%   { transform: translate(-50%, 70vh); animation-timing-function: cubic-bezier(.25, .6, .35, 1); }
  70%  { transform: translate(-50%, calc(-50% - 14px)); animation-timing-function: cubic-bezier(.45, 0, .55, 1); }
  100% { transform: translate(-50%, -50%); }
}
@keyframes alias-sway { from { transform: rotate(-3deg) translateY(0); } to { transform: rotate(3deg) translateY(-2%); } }
/* the value's name, on a cream ribbon over the balloon */
.alias-name {
  position: absolute; left: 50%; bottom: 4%; transform: translateX(-50%); width: max-content; max-width: min(88vw, 640px);
  padding: 8px 22px; border-radius: 18px; text-align: center; text-wrap: balance;
  font-size: clamp(26px, 7 * var(--u), 54px); line-height: 1.12; font-weight: 900; color: #3a1d0c;
  background: linear-gradient(#fffdf7, #f6e7ca); border: 3px solid var(--gold); box-shadow: 0 8px 20px rgba(110, 60, 10, .35);
}
.alias-name.long { font-size: clamp(20px, 5 * var(--u), 38px); }
/* no balloon picture: a golden balloon with the name written on it */
.alias-balloon.plain { aspect-ratio: .78; }
.alias-plain {
  position: relative; width: 100%; flex: 0 0 82%; border-radius: 50% 50% 48% 48% / 56% 56% 44% 44%;
  background: radial-gradient(circle at 34% 28%, #fffef6 0 6%, #ffeeb8 14%, #f6cc6a 48%, #d9a033 78%, #b97d1e 100%);
  box-shadow: inset -14px -18px 30px rgba(140, 80, 10, .35), inset 10px 10px 24px rgba(255, 255, 240, .5), 0 12px 22px rgba(110, 60, 10, .3);
  display: flex; align-items: center; justify-content: center; animation: alias-sway 3s ease-in-out -1.5s infinite alternate both; transform-origin: 50% 120%;
}
.alias-plain::after { content: ''; position: absolute; bottom: -4%; left: 50%; width: 9%; aspect-ratio: 1.2; transform: translateX(-50%); background: #c08a2a; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.alias-plain .alias-name { position: static; transform: none; max-width: 86%; background: none; border: 0; box-shadow: none; padding: 0;
  color: #4a2307; text-shadow: 0 1px 0 rgba(255, 245, 210, .8); }
.alias-string { flex: 1; width: 3px; background: repeating-linear-gradient(#c79a3c 0 8px, #e8c46c 8px 14px); border-radius: 3px; }
.alias-balloon.popped { animation: alias-popped .4s ease-out forwards; }
@keyframes alias-popped { 0% { transform: translate(-50%, -50%) scale(1); opacity: 1; } 35% { transform: translate(-50%, -50%) scale(1.15); opacity: 1; } 100% { transform: translate(-50%, -50%) scale(1.5); opacity: 0; filter: blur(4px); } }
.alias-balloon.away { animation: alias-away .7s cubic-bezier(.5, 0, .8, .5) forwards; }
@keyframes alias-away { to { transform: translate(-50%, -140vh); opacity: .6; } }
.alias-count { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: clamp(120px, 34 * var(--u), 260px); font-weight: 900; color: #c98d22;
  text-shadow: 0 6px 0 #fff3d0, 0 0 40px rgba(255, 220, 140, .9); pointer-events: none; z-index: 3; }
.alias-count.beat { animation: alias-beat .7s ease both; }
@keyframes alias-beat { from { transform: scale(1.6); opacity: 0; } 30% { opacity: 1; } to { transform: scale(.9); opacity: .85; } }
.alias-bottom { width: min(100%, 760px); flex: none; display: flex; flex-direction: column; gap: 10px; }
.alias-time { position: relative; height: 30px; border-radius: 999px; overflow: hidden; background: rgba(255, 250, 238, .85); border: 3px solid var(--gold); box-shadow: inset 0 2px 4px rgba(110, 70, 20, .2); }
.alias-time i { position: absolute; inset: 0 auto 0 0; width: 100%; background: linear-gradient(90deg, #e7883a, #f2c46a); transition: width .1s linear; }
.alias-time span { position: absolute; inset: 0; display: grid; place-items: center; font-weight: 900; font-size: 18px; color: #4a2307; }
.alias-play.hurry .alias-time i { background: linear-gradient(90deg, #c4421c, #ec7b3a); animation: alias-hurry .5s ease-in-out infinite alternate; }
@keyframes alias-hurry { to { filter: brightness(1.25); } }
.alias-actions { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; }
.alias-actions button { margin: 0; min-height: 76px; }
.alias-hit { background: linear-gradient(#ffe7a6, #f2bf5c); border-color: #c98d22; font-size: clamp(22px, 5 * var(--u), 34px); }
.alias-skip { color: var(--ink-soft); }
.alias-actions button:disabled { opacity: .5; }
/* the pop */
.alias-burst { position: fixed; z-index: 5; width: 0; height: 0; pointer-events: none; }
.alias-burst i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border-radius: 50%; background: radial-gradient(circle, #fff7c8, #f2b63c);
  box-shadow: 0 0 10px #ffd76a; animation: alias-spark .9s ease-out forwards; }
.alias-burst i:nth-child(3n) { background: radial-gradient(circle, #fff, #ff9f6b); }
@keyframes alias-spark { to { transform: rotate(var(--a)) translateY(calc(-1 * var(--d))) scale(.2); opacity: 0; } }
.alias-burst b { position: absolute; transform: translate(-50%, -50%); font-size: 56px; font-weight: 900; color: #3f8a2a; text-shadow: 0 3px 0 #fff, 0 0 18px #fff; animation: alias-plus 1s ease-out forwards; }
@keyframes alias-plus { from { transform: translate(-50%, -50%) scale(.6); } to { transform: translate(-50%, -160%) scale(1.15); opacity: 0; } }
.alias-burst.big i { width: 18px; height: 18px; }

/* ---------- end of a turn / final ---------- */
.alias-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 4px 0 10px; max-height: 38dvh; overflow-y: auto; }
.alias-chip { display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px 5px 8px; border-radius: 999px; font-weight: 800; font-size: 16px;
  background: #fff8e6; border: 2px solid #c9a24f; }
.alias-chip img { height: 34px; width: auto; }
.alias-chip.skip { opacity: .55; border-style: dashed; }
.alias-legend { font-size: 14px; color: var(--ink-soft); margin: 0 0 6px; }
.alias-legend span { margin: 0 6px; }
.alias-candles { display: flex; justify-content: center; gap: 40px; height: clamp(190px, 40 * var(--u), 300px); margin: 6px 0 4px; }
.alias-candle { position: relative; height: 100%; aspect-ratio: 260 / 1089; animation: alias-candle-up .9s cubic-bezier(.2, .9, .3, 1.2) both; }
/* the three candle layers are full-size frames of the same picture, stacked */
.alias-candle img { position: absolute; inset: 0; width: 100%; height: 100%; }
.alias-candle .ac-body { filter: drop-shadow(0 6px 8px rgba(80, 40, 5, .35)); }
.alias-candle .ac-flame { opacity: 0; transform-origin: 50% 32%; }
.alias-candle.lit .ac-flame { animation: alias-flame-on .6s ease .7s forwards, alias-flicker 1.2s ease-in-out 1.3s infinite alternate; filter: drop-shadow(0 0 16px #ffc24a); }
@keyframes alias-candle-up { from { transform: translateY(40%); opacity: 0; } }
@keyframes alias-flame-on { from { opacity: 0; transform: scale(.2); } to { opacity: 1; transform: scale(1); } }
@keyframes alias-flicker { from { opacity: 1; transform: rotate(-3deg) scale(.97); } to { opacity: 1; transform: rotate(3deg) scale(1.04); } }
.alias-card.final .alias-secondary { margin-top: 10px; }

@media (orientation: landscape) {
  .alias-balloon { height: min(70%, 60dvh); }
  .alias-bottom { width: min(100%, 900px); }
}
@media (prefers-reduced-motion: reduce) {
  .alias-screen::before, .alias-balloon > img, .alias-plain, .ac-art.balloons img { animation: none; }
}
@media (orientation: portrait) {
  .alias-choices { width: 100%; }
  .alias-choice { padding: 22px 14px 26px; }
  .ac-art { height: clamp(170px, 46 * var(--u), 340px); }
}

/* 8 Nov 2026 (2): the value's name is not carried up with its balloon — once the balloon has arrived
   the name pops in on its own (with a little sound), and fades when the balloon is popped or skipped */
.alias-pop-name { z-index: 2; bottom: 14%; cursor: pointer;
  animation: alias-name-pop .55s cubic-bezier(.2, 1.6, .4, 1) 1.2s both; }
@keyframes alias-name-pop {
  from { opacity: 0; transform: translateX(-50%) scale(.2); }
  to   { opacity: 1; transform: translateX(-50%) scale(1); }
}
.alias-pop-name.out { animation: alias-name-out .3s ease-in forwards; }
@keyframes alias-name-out { from { opacity: 1; transform: translateX(-50%) scale(1); } to { opacity: 0; transform: translateX(-50%) scale(1.25); } }
/* the explaining instruction stays on screen for the whole minute */
.alias-play .alias-style { position: relative; z-index: 3; }

/* a couple: both balloons side by side, leaning apart a little */
.alias-balloon.group { flex-direction: row; align-items: flex-start; }
.alias-balloon.group > img { max-width: 44vw; margin: 0 -2%; }
.alias-balloon.group > img:nth-child(1) { rotate: -5deg; }
.alias-balloon.group > img:nth-child(2) { rotate: 5deg; animation-delay: -2.6s; margin-top: 4%; }

/* alone: one team only on the bar */
body.solo-game .game-scoreboard .game-score.second { display: none !important; }
.alias-chooser .ac-art.balloons img { height: 68%; max-width: 40%; object-fit: contain; left: calc(50% + (var(--i) - 1) * 26%); }
.alias-chooser .ac-art.balloons img:nth-child(2) { height: 80%; }

/* 8 Nov 2026 (3): the Alias candle lights exactly like the one on the cake: the white wick catches and
   fades (it is under the burnt wick of the candle body), the flame grows from a spark with a bright
   flash, then flickers (same keyframes as round-ui.css) */
.alias-candle .ac-wick { opacity: 0; }
.alias-candle .ac-flame { opacity: 0; transform-origin: 50% 33%; }
.alias-candle.lit .ac-wick { opacity: 1; animation: wick-burn 1s ease 1s both; }
.alias-candle.lit .ac-flame {
  filter: drop-shadow(0 0 calc(2.2 * var(--u)) rgba(255, 180, 60, .75));
  animation: flame-ignite 1.1s cubic-bezier(.2, 1.5, .4, 1) .95s both, flame-flicker 2.4s ease-in-out 2.1s infinite;
}

/* ===== 9 Nov 2026: ״שלווהס״ — every screen of the Alias game on the red speech-bubble background,
   with glossy red panels, a red team bar and red pill buttons framed in white (the mode picker stays gold) ===== */
.alias-screen.shalvas {
  --ink: #fff; --ink-soft: rgba(255, 236, 236, .85); --gold: #fff;
  background: #c50008 url(assets/shalvas/background.jpg) center / cover no-repeat;
  color: #fff;
}
.alias-screen.shalvas::before { display: none; }
/* glossy red surface shared by the bar, the cards and the buttons */
.shalvas .alias-bar, .shalvas .alias-primary, .shalvas .alias-secondary, .shalvas .alias-hit, .shalvas .alias-skip, .shalvas .alias-time, .shalvas .alias-name:not(.alias-plain .alias-name), .shalvas .alias-style {
  background: radial-gradient(120% 140% at 50% 40%, #b8000a 0%, #a0000a 45%, #e3000f 100%);
  border: 4px solid #fff; color: #fff;
  box-shadow: 0 0 0 1px rgba(150, 0, 0, .35), 0 8px 18px rgba(80, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .35);
  position: relative; overflow: hidden;
}
/* the little shine in the top corner, like the card */
.shalvas .alias-bar::after, .shalvas .alias-primary::after, .shalvas .alias-hit::after, .shalvas .alias-secondary::after {
  content: ''; position: absolute; top: 6px; inset-inline-end: 22px; width: 32%; height: 22%; min-height: 8px; border-radius: 50%;
  background: linear-gradient(rgba(255, 255, 255, .75), rgba(255, 255, 255, .05)); transform: rotate(-8deg); pointer-events: none; opacity: .8;
}
.shalvas .alias-bar { border-radius: 36px; padding: 10px 18px; }
.shalvas .alias-team.active { background: rgba(255, 255, 255, .16); box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .7); }
.shalvas .alias-team-name, .shalvas .alias-team-score b { color: #fff; }
.shalvas .alias-team-score small { color: rgba(255, 255, 255, .8); }
.shalvas .alias-card {
  background: url(assets/shalvas/card.webp) center / 100% 100% no-repeat; border: 0; box-shadow: none;
  padding: clamp(26px, 6 * var(--u), 46px) clamp(22px, 5 * var(--u), 40px); filter: drop-shadow(0 14px 26px rgba(80, 0, 0, .45));
}
.shalvas .alias-eyebrow { color: rgba(255, 240, 240, .92); letter-spacing: 2px; }
.shalvas .alias-title { color: #fff; text-shadow: 0 3px 0 rgba(120, 0, 0, .55), 0 0 18px rgba(255, 255, 255, .25); }
.shalvas .alias-rules, .shalvas .alias-sub, .shalvas .alias-legend { color: #fff; }
.shalvas .alias-legend .ok, .shalvas .alias-legend .skip { color: #fff; }
.shalvas .alias-primary, .shalvas .alias-secondary, .shalvas .alias-hit, .shalvas .alias-skip { color: #fff; border-radius: 999px; }
.shalvas .alias-skip { opacity: .92; }
.shalvas .alias-text { color: #fff; }
.shalvas .alias-chip { background: rgba(255, 255, 255, .95); color: #9a0008; border-color: #fff; }
.shalvas .alias-time { background: rgba(110, 0, 6, .55); }
.shalvas .alias-time i { background: linear-gradient(90deg, #fff, #ffd6d6); }
.shalvas .alias-time span { color: #9a0008; text-shadow: 0 0 6px #fff; }
.shalvas.hurry .alias-time i { background: linear-gradient(90deg, #ffe08a, #fff); }
.shalvas .alias-count { color: #fff; text-shadow: 0 6px 0 rgba(120, 0, 0, .6), 0 0 40px rgba(255, 255, 255, .5); }
.shalvas .alias-name { color: #fff; }
.shalvas .alias-style small { color: rgba(255, 255, 255, .85); }
.shalvas .alias-burst b { color: #fff; text-shadow: 0 3px 0 #9a0008, 0 0 18px rgba(255, 255, 255, .8); }
.shalvas .alias-burst i { background: radial-gradient(circle, #fff, #ffc2c2); box-shadow: 0 0 10px #fff; }
.shalvas .alias-balloon > img { filter: drop-shadow(0 14px 18px rgba(70, 0, 0, .5)); }
/* the value's name keeps its own placement (it pops in under the balloon) */
.alias-screen.shalvas .alias-sky .alias-pop-name { position: absolute !important; overflow: visible !important; }
.alias-screen.shalvas .alias-plain .alias-name { color: #8a0008; text-shadow: 0 1px 0 rgba(255, 245, 210, .8); }

/* ===== 9 Nov 2026: the ״שלווהס״ opening — background, then the bubble, then the word ===== */
.alias-screen.shalvas.alias-intro { background-image: url(assets/shalvas/bg-plain.jpg); }
.sv-layers { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.sv-layers img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; max-width: none; }
.sv-bubble { transform-origin: 50% 44%; animation: sv-bubble .75s cubic-bezier(.2, 1.5, .35, 1) .45s both; }
.sv-word { transform-origin: 50% 40%; animation: sv-word .6s cubic-bezier(.2, 1.7, .35, 1) 1.2s both; }
@keyframes sv-bubble { from { opacity: 0; transform: scale(.15); } 40% { opacity: 1; } to { opacity: 1; transform: scale(1); } }
@keyframes sv-word { from { opacity: 0; transform: scale(.3) rotate(-8deg); } to { opacity: 1; transform: scale(1) rotate(0); } }
/* the bar, the rules and the start button come after the word */
.alias-intro .alias-bar, .alias-intro .sv-after { animation: sv-show .5s ease 2s both; }
@keyframes sv-show { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.alias-intro.no-rules .alias-center { justify-content: flex-end; padding-bottom: 4vh; }
.sv-start { width: min(100%, 560px); display: flex; flex-direction: column; align-items: center; gap: 10px; }
.sv-eyebrow { font-weight: 900; font-size: clamp(20px, 4.6 * var(--u), 32px); color: #fff; text-shadow: 0 2px 0 rgba(120, 0, 0, .6); text-align: center; }
@media (prefers-reduced-motion: reduce) { .sv-bubble, .sv-word, .alias-intro .alias-bar, .alias-intro .sv-after { animation: none; } }

/* the result-screen button that leads into ״שלווהס״ already wears its red */
body.cake-layout .round-panel .round-controls > .shalvas-btn {
  background: radial-gradient(120% 140% at 50% 40%, #b8000a 0%, #a0000a 45%, #e3000f 100%) !important;
  border: 4px solid #fff !important; color: #fff !important; border-radius: 999px;
  box-shadow: 0 0 0 1px rgba(150, 0, 0, .35), 0 8px 18px rgba(80, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .35) !important;
  text-shadow: 0 2px 0 rgba(110, 0, 0, .5);
}

/* 9 Nov 2026: the balloon floats a few centimetres lower; its name pops in just under it */
.alias-play .alias-balloon { top: calc(50% + min(11vh, 110px)); }
.alias-play .alias-pop-name { bottom: 1%; }

/* 9 Nov 2026: ״איך משחקים?״ under the starting team's button, and the rules it opens */
.sv-start .sv-how { min-height: 52px; font-size: clamp(17px, 3.6 * var(--u), 24px); width: 78%; margin-top: 2px; }
.sv-rules { position: absolute; inset: 0; z-index: 6; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(90, 0, 4, .45); animation: alias-in .25s ease both; }
.sv-rules .alias-card { max-height: 90dvh; overflow-y: auto; }

/* 9 Nov 2026 (2): the balloon floats right in the middle of the speech bubble, over the word;
   3·2·1 sits lower in the bubble, under the word; faces are bigger */
.alias-screen.shalvas.alias-play {
  --bh: min(42vh, 54 * var(--u));
  --bc: 41vh; /* the bubble's centre on screen (portrait: the picture fills the height) */
}
@media (orientation: landscape) {
  .alias-screen.shalvas.alias-play { --bh: min(44vh, 54 * var(--u)); --bc: max(28vh, calc(86px + var(--bh) / 2)); }
}
.alias-screen.shalvas.alias-play .alias-balloon { position: fixed; top: var(--bc); height: var(--bh); z-index: 1; }
.alias-screen.shalvas.alias-play .alias-balloon.face { height: calc(var(--bh) * 1.22); }
.alias-screen.shalvas.alias-play .alias-sky .alias-pop-name { position: fixed !important; bottom: auto; top: calc(var(--bc) + var(--bh) / 2 + 14px); }
.alias-screen.shalvas.alias-play:has(.alias-balloon.face:not(.gone)) .alias-sky .alias-pop-name { top: calc(var(--bc) + var(--bh) * .61 + 14px); }
.alias-screen.shalvas .alias-count { align-items: flex-start; padding-top: calc(var(--bc, 41vh) + 6vh); font-size: clamp(90px, 24 * var(--u), 190px); }
@media (orientation: landscape) { .alias-screen.shalvas .alias-count { padding-top: 40vh; } }

.alias-screen.shalvas .alias-plain .alias-name.long { font-size: clamp(18px, 4.4 * var(--u), 34px); overflow-wrap: anywhere; }

/* temporary skip button (top corner of the שלווהס opening) */
.sv-skip { position: absolute; z-index: 5; top: calc(max(12px, env(safe-area-inset-top)) + 64px); left: 14px; padding: 10px 16px; border-radius: 999px;
  background: rgba(255,255,255,.9); color: #9a0008; border: 2px solid #fff; font: 800 15px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; cursor: pointer;
  box-shadow: 0 4px 10px rgba(80,0,0,.3); animation: sv-show .5s ease 1.6s both; }

/* ===== 9 Nov 2026 (3): שלווהס layout — plain red background, the logo sized to fit (never cut), the red cake
   lying along the bottom (2360 × 770, its middle tier's flat top at 10.76vw from the strip's top, 47.9% across),
   and the candle standing there. The buttons sit just above the candle. ===== */
.alias-screen.shalvas {
  background-image: url(assets/shalvas/bg-plain.jpg) !important;
  --sh: min(calc(100vw / 3.065), 30dvh);
  --cb: calc(100dvh - var(--sh) + 10.76vw);
  --chh: min(14dvh, 22vw);
  --ct: calc(var(--cb) - var(--chh));
  --lt: calc(max(10px, env(safe-area-inset-top)) + 74px);
  --lh: max(140px, min(calc(var(--ct) - 150px - var(--lt)), calc(92vw / .9741)));
  --lw: calc(var(--lh) * .9741);
  padding-bottom: calc(100dvh - var(--ct) + 10px) !important;
}
.alias-screen.shalvas .sv-layers { display: none; }
.sv-logo { position: fixed; z-index: 0; top: var(--lt); left: calc(50vw - var(--lw) / 2); width: var(--lw); height: var(--lh); pointer-events: none; }
.sv-logo img { position: absolute; inset: 0; width: 100%; height: 100%; }
.alias-intro .sv-logo .sv-bubble { animation: sv-bubble .75s cubic-bezier(.2, 1.5, .35, 1) .45s both; transform-origin: 50% 45%; }
.alias-intro .sv-logo .sv-word { animation: sv-word .6s cubic-bezier(.2, 1.7, .35, 1) 1.2s both; transform-origin: 50% 43%; }
.sv-cake { position: fixed; z-index: 0; left: 0; right: 0; bottom: 0; height: var(--sh); pointer-events: none; }
.sv-cake img { width: 100%; height: 100%; object-fit: cover; object-position: center top; filter: drop-shadow(0 -6px 14px rgba(80, 0, 0, .35)); }
.sv-candle { position: fixed; z-index: 0; left: calc(47.9vw - var(--chh) * .1766); top: var(--ct); height: var(--chh); aspect-ratio: 417 / 1181; pointer-events: none; }
.sv-candle-body { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 6px 8px rgba(80, 0, 0, .35)); }
.sv-candle-flame { position: absolute; left: 50%; bottom: 95%; width: 150%; height: auto; transform: translateX(-50%) scale(.2); transform-origin: 50% 90%; opacity: 0; }
.sv-candle.lit .sv-candle-flame { animation: sv-flame-on .7s cubic-bezier(.2, 1.5, .4, 1) .8s forwards, sv-flicker 1.4s ease-in-out 1.5s infinite alternate; filter: drop-shadow(0 0 16px rgba(255, 190, 80, .9)); }
@keyframes sv-flame-on { to { opacity: 1; transform: translateX(-50%) scale(1); } }
@keyframes sv-flicker { from { transform: translateX(-50%) rotate(-3deg) scale(.97); opacity: 1; } to { transform: translateX(-50%) rotate(3deg) scale(1.04); opacity: 1; } }
.alias-screen.shalvas > *:not(.sv-logo):not(.sv-cake):not(.sv-candle):not(.alias-burst):not(.sv-party) { position: relative; z-index: 1; }
/* the balloon in the middle of the bubble */
.alias-screen.shalvas.alias-play { --bh: calc(var(--lh) * .5); --bc: calc(var(--lt) + var(--lh) * .44); }
.alias-screen.shalvas .alias-count { padding-top: calc(var(--lt) + var(--lh) * .62) !important; font-size: calc(var(--lh) * .2); }
.alias-intro.no-rules .alias-center { padding-bottom: 0; }

/* the final: the card takes the stage (no logo behind it), the cake candle lights below it */
.alias-final.shalvas .sv-logo { display: none; }
.alias-final.shalvas .alias-candles { height: clamp(110px, 20dvh, 220px); }
.alias-final.shalvas .sv-candle { z-index: 2; }
@media (orientation: landscape) {
  .alias-final.shalvas .alias-candles { height: 13dvh; margin: 2px 0; }
  .alias-final.shalvas .alias-title { font-size: 5.4dvh; line-height: 1.1; margin: 4px 0; }
  .alias-final.shalvas .alias-card { padding-top: 12px; padding-bottom: 14px; }
}
/* 9 Nov 2026 (4): the buttons come down over the cake (covering the foot of the candle); the logo grows into the space.
   The final keeps the candle in view, so it stays above it. */
.alias-screen.shalvas:not(.alias-final) {
  --bb: calc(var(--cb) + 1dvh);
  --lh: max(140px, min(calc(var(--bb) - 165px - var(--lt)), calc(92vw / .9741)));
  padding-bottom: calc(100dvh - var(--bb)) !important;
}
.alias-screen.shalvas:not(.alias-final) .sv-candle { z-index: 0; }

/* 9 Nov 2026 (5): no fade between two Alias screens (the game behind never shows) */
.alias-screen.swap { animation: none; }
/* the buttons as low on the screen as they go (play and the opening); the final keeps the lit candle in view */
.alias-screen.shalvas:not(.alias-final) { padding-bottom: max(14px, env(safe-area-inset-bottom)) !important; }
.alias-screen.shalvas.alias-play .alias-bottom { margin-top: auto; }
.alias-intro.shalvas .alias-center { justify-content: flex-end; padding-bottom: 0; }
/* the winners' party */
.sv-party { position: fixed !important; inset: 0; z-index: 0 !important; pointer-events: none; overflow: hidden; }
.sv-party i { position: absolute; top: -30px; left: var(--x); width: var(--w); height: calc(var(--w) * 1.6); background: var(--c); border-radius: 2px;
  box-shadow: 0 1px 2px rgba(80, 0, 0, .3); animation: sv-confetti var(--dur) linear var(--del) infinite; }
.sv-party i.round { border-radius: 50%; height: var(--w); }
.sv-party i.ribbon { width: 4px; height: calc(var(--w) * 3.4); border-radius: 3px; }
@keyframes sv-confetti {
  0% { transform: translate(0, 0) rotate(0); }
  25% { transform: translate(var(--sway), 27dvh) rotate(calc(var(--spin) * .25)); }
  50% { transform: translate(calc(var(--sway) * -.6), 54dvh) rotate(calc(var(--spin) * .5)); }
  75% { transform: translate(var(--sway), 81dvh) rotate(calc(var(--spin) * .75)); }
  100% { transform: translate(0, calc(100dvh + 60px)) rotate(var(--spin)); }
}
.sv-party-balloon { position: absolute; left: var(--x); bottom: -30dvh; height: var(--h); width: auto; filter: drop-shadow(0 8px 10px rgba(80, 0, 0, .35));
  animation: sv-party-up var(--dur) cubic-bezier(.3, .1, .5, 1) var(--del) both; }
@keyframes sv-party-up { 0% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-70dvh) rotate(4deg); } 100% { transform: translateY(-140dvh) rotate(-3deg); } }
.shalvas .sv-firework i { width: 12px; height: 12px; background: var(--fc, #fff) !important; box-shadow: 0 0 12px var(--fc, #fff), 0 0 4px #fff !important; }
.alias-final.shalvas .alias-card { position: relative; z-index: 2; }
@media (prefers-reduced-motion: reduce) { .sv-party i, .sv-party-balloon { animation-duration: 12s; } }

/* 10 Nov 2026: the logo stays put on the play screens (its pop-in is only for the opening), and the 3-2-1
   sits inside the speech bubble, just under the word */
.alias-screen.shalvas:not(.alias-intro) .sv-logo .sv-word,
.alias-screen.shalvas:not(.alias-intro) .sv-logo .sv-bubble { animation: none !important; opacity: 1; transform: none; }
.alias-screen.shalvas > .alias-count { position: fixed !important; inset: auto !important; left: 0 !important; right: 0 !important;
  top: calc(var(--lt) + var(--lh) * .55) !important; padding: 0 !important; height: auto; z-index: 3 !important;
  display: flex; justify-content: center; align-items: flex-start; font-size: calc(var(--lh) * .19) !important; line-height: 1; pointer-events: none; }
/* 10 Nov 2026: a bunch of two or three of the same balloon */
.alias-balloon.bunch > img { max-width: 34vw; }
.alias-balloon.bunch > img:nth-child(3) { rotate: 2deg; animation-delay: -1.3s; margin-top: 8%; }
.alias-balloon.bunch:has(> img:nth-child(3)) > img { max-width: 28vw; }
