@font-face {
  font-family: "Mellow Arabic";
  src: url("/fonts/cairo-arabic.woff2") format("woff2");
  font-display: swap;
}
* { box-sizing: border-box; }
html.scene-overlay-document,
body.scene-overlay-body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: transparent;
}
body.scene-overlay-body { position: relative; }
.scene-overlay-body > .mellow-scene { position: absolute; }
.scene-loading,.scene-error {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  gap: 14px;
  padding: 24px;
  color: #fff;
  text-align: center;
}
.scene-loading span {
  width: 42px;
  aspect-ratio: 1;
  margin: auto;
  border: 4px solid rgba(255,255,255,.14);
  border-top-color: #9a66ff;
  border-radius: 50%;
  animation: scene-loader-spin .8s linear infinite;
}
.scene-error { background: rgba(7,8,16,.9); }
.scene-error button {
  min-height: 42px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
  background: #7c4ee7;
  color: #fff;
  font: inherit;
}
.test-ribbon {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-start: 12px;
  z-index: 1000;
  padding: 6px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  background: rgba(72,45,139,.88);
  color: #fff;
  font-size: 12px;
  font-weight: 850;
  backdrop-filter: blur(12px);
}
.mellow-scene {
  --scene-text: #fffdf8;
  --scene-muted: #b7b3c7;
  --scene-violet: #9a66ff;
  --scene-violet-soft: #c5a7ff;
  --scene-gold: #efc473;
  --scene-gold-soft: #ffe1a5;
  --scene-surface: #11131f;
  --scene-border: rgba(226,220,255,.24);
  position: relative;
  isolation: isolate;
  width: 100%;
  height: 100%;
  overflow: hidden;
  container-type: size;
  color: var(--scene-text);
  background: transparent;
  font-family: "Mellow Arabic", "IBM Plex Sans Arabic", "Noto Sans Arabic", "Segoe UI", sans-serif;
  font-size: calc(16px * var(--scene-scale, 1));
  line-height: 1.4;
}
.mellow-scene::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--scene-background-blur, 0px));
  z-index: -2;
  background: var(--scene-background, transparent) center / cover no-repeat;
  opacity: var(--scene-background-opacity, 0);
  filter: blur(var(--scene-background-blur, 0px));
  pointer-events: none;
}
.mellow-scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle at 18% 10%, rgba(139,92,246,.08), transparent 38%), radial-gradient(circle at 82% 96%, rgba(241,200,118,.05), transparent 34%);
}
.mellow-scene[data-background="black"]::before { background:#000; }
.mellow-scene[data-background="color"]::before { background:var(--scene-background,#080912); }
.mellow-scene[data-background="stars"]::before {
  background-color:#060713;
  background-image:
    radial-gradient(circle,rgba(255,255,255,.95) 0 1px,transparent 1.8px),
    radial-gradient(circle,rgba(218,198,255,.8) 0 1.3px,transparent 2px),
    radial-gradient(circle,rgba(255,219,151,.72) 0 1px,transparent 1.7px),
    radial-gradient(circle,rgba(255,255,255,.55) 0 .8px,transparent 1.5px),
    radial-gradient(ellipse at 74% 18%,rgba(126,74,225,.22),transparent 33%),
    linear-gradient(145deg,#060713 0%,#100d24 54%,#080912 100%);
  background-position:7px 11px,31px 19px,17px 43px,53px 7px,0 0,0 0;
  background-size:43px 47px,67px 71px,89px 83px,113px 101px,100% 100%,100% 100%;
  opacity:var(--scene-background-opacity,1);
}
.mellow-scene[data-background="stars"]::after {
  opacity:calc(var(--scene-background-opacity,1) * .82);
  background:
    radial-gradient(circle at 18% 22%,#fff 0 .12%,rgba(255,255,255,.42) .18%,transparent .52%),
    radial-gradient(circle at 79% 29%,#ffe3a9 0 .1%,rgba(255,217,145,.35) .2%,transparent .48%),
    radial-gradient(circle at 61% 76%,#d4b9ff 0 .1%,rgba(182,135,255,.34) .2%,transparent .5%),
    linear-gradient(115deg,transparent 20%,rgba(150,103,229,.08) 45%,rgba(245,210,152,.06) 54%,transparent 73%);
}
.mellow-scene[data-background="aurora"]::before {
  background:radial-gradient(ellipse at 12% 72%,rgba(108,60,215,.48),transparent 43%),radial-gradient(ellipse at 86% 18%,rgba(241,200,118,.2),transparent 40%),linear-gradient(145deg,#070812,#16102b 56%,#080a16);
  opacity:var(--scene-background-opacity,1);
}
.mellow-scene[data-background="aurora"]::after {
  inset:-18%;
  opacity:calc(var(--scene-background-opacity,1) * .72);
  background:conic-gradient(from 205deg at 50% 54%,transparent 0 15%,rgba(126,74,225,.48) 23%,rgba(207,159,255,.22) 31%,transparent 42% 58%,rgba(241,200,118,.2) 66%,transparent 78%);
  filter:blur(34px) saturate(1.22);
  transform:rotate(-8deg) scale(1.12);
}
.mellow-scene[data-background="waves"]::before {
  background:radial-gradient(ellipse at 20% 115%,rgba(116,66,216,.4),transparent 52%),radial-gradient(ellipse at 86% -18%,rgba(241,200,118,.2),transparent 48%),linear-gradient(165deg,#080914,#121426);
  opacity:var(--scene-background-opacity,1);
}
.mellow-scene[data-background="waves"]::after {
  inset:auto -12% -18%;
  height:58%;
  opacity:calc(var(--scene-background-opacity,1) * .82);
  border-radius:48% 54% 0 0 / 25% 28% 0 0;
  background:repeating-radial-gradient(ellipse at 50% 112%,transparent 0 11%,rgba(165,108,255,.2) 11.4% 12%,transparent 12.5% 19%,rgba(241,200,118,.1) 19.4% 20%,transparent 20.5% 28%);
  filter:blur(1px) drop-shadow(0 -10px 28px rgba(128,72,224,.24));
}
.mellow-scene[data-background="geometric"]::before {
  background-color:#080912;
  background-image:linear-gradient(135deg,transparent 48.7%,rgba(241,200,118,.13) 49% 49.7%,transparent 50%),linear-gradient(45deg,transparent 48.7%,rgba(139,92,246,.16) 49% 49.7%,transparent 50%),radial-gradient(circle at 75% 18%,rgba(119,72,214,.2),transparent 34%);
  background-size:96px 96px,96px 96px,100% 100%;
  opacity:var(--scene-background-opacity,1);
}
.mellow-scene[data-background="geometric"]::after {
  opacity:calc(var(--scene-background-opacity,1) * .55);
  background:linear-gradient(120deg,transparent 0 62%,rgba(241,200,118,.18) 62.2% 62.5%,transparent 62.7%),linear-gradient(28deg,transparent 0 24%,rgba(173,117,255,.18) 24.2% 24.5%,transparent 24.7%);
}
.mellow-scene[data-background-motion="on"][data-background="stars"]::before { animation:scene-background-drift 42s linear infinite; }
.mellow-scene[data-background-motion="on"][data-background="stars"]::after { animation:scene-stars-twinkle 4.8s ease-in-out infinite alternate; }
.mellow-scene[data-background-motion="on"][data-background="aurora"]::after { animation:scene-aurora-flow 13s ease-in-out infinite alternate; }
.mellow-scene[data-background-motion="on"][data-background="waves"]::after { animation:scene-waves-flow 16s ease-in-out infinite alternate; }
.mellow-scene[data-background-motion="on"][data-background="geometric"]::after { animation:scene-geometry-drift 22s linear infinite; }
.mellow-scene.style-pearl,.mellow-scene.style-pearl-gold { --scene-text:#17131d; --scene-muted:#635d68; --scene-surface:#fff9ed; --scene-border:rgba(130,96,49,.22); --scene-violet:#7a4bd3; }
.mellow-scene.style-midnight { --scene-surface:#0d1019; --scene-violet:#9b72ff; --scene-gold:#efc36b; }
.mellow-scene.style-soft-3d { --scene-surface:#171427; --scene-border:rgba(222,210,255,.28); }
.mellow-scene.style-clean-esports,.mellow-scene.style-esports { --scene-surface:#0b1019; --scene-violet:#8b5cf6; --scene-gold:#ffcf6b; }
.mellow-scene.style-transparent-minimal { --scene-surface:transparent; --scene-border:rgba(255,255,255,.14); }

.scene-element {
  position: absolute;
  min-width: 0;
  min-height: 0;
  /* cqw/cqh must resolve against this card, not the whole scene.  Without a
     size container a narrow portrait leaderboard inherited the canvas width
     and its names, medals and values collided. */
  container-type: size;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(8px, 1.35cqw, 20px);
  overflow: hidden;
  border: var(--element-border-width,1px) solid color-mix(in srgb,var(--element-border-color,var(--scene-border)) var(--element-border-alpha,58%),transparent);
  border-radius: var(--element-radius,22px);
  background: color-mix(in srgb,var(--element-background-color,var(--scene-surface)) var(--element-background-alpha,72%),transparent);
  color: var(--element-text-color,var(--scene-text));
  font-size: calc(1em * var(--item-font-scale,1));
  box-shadow: 0 14px 50px rgba(0,0,0,var(--element-shadow-alpha,.24)), 0 0 34px color-mix(in srgb,var(--element-border-color,var(--scene-violet)) var(--element-glow-percent,0%),transparent);
  backdrop-filter: blur(var(--element-blur,0));
  transform: translateZ(0);
}
.scene-element::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  opacity: var(--element-sheen-alpha,0);
  background: linear-gradient(128deg,rgba(255,255,255,.6),transparent 25%,transparent 68%,rgba(255,255,255,.16));
  pointer-events: none;
}
.scene-element > * { position: relative; z-index: 1; }
.scene-element[data-surface="none"] { border-color: transparent; background: transparent; box-shadow: none; backdrop-filter: none; }
.scene-element[data-surface="none"]::before { display: none; }
.scene-element[data-surface="solid"] { backdrop-filter: none; }
.scene-element[data-surface="glass"] { background: linear-gradient(135deg,rgba(255,255,255,.13),rgba(139,92,246,.07) 45%,rgba(255,255,255,.035)); border-color: rgba(255,255,255,.22); backdrop-filter: blur(var(--element-blur,14px)) saturate(1.2); }
.scene-element[data-surface="frosted"] { background: linear-gradient(135deg,rgba(232,226,255,.23),rgba(255,255,255,.08)); border-color: rgba(255,255,255,.34); backdrop-filter: blur(var(--element-blur,24px)) saturate(.85); }
.scene-element[data-surface="bubble"] { border-color: rgba(255,255,255,.42); background: radial-gradient(circle at 24% 12%,rgba(255,255,255,.34),transparent 22%),radial-gradient(circle at 78% 82%,rgba(241,200,118,.16),transparent 32%),linear-gradient(135deg,rgba(139,92,246,.22),rgba(255,255,255,.075) 48%,rgba(241,200,118,.11)); box-shadow: inset 0 1px rgba(255,255,255,.55), inset 0 -16px 30px rgba(139,92,246,.08), 0 16px 52px rgba(0,0,0,.34), 0 0 28px rgba(151,104,255,var(--element-glow-alpha,.2)); backdrop-filter: blur(var(--element-blur,14px)) saturate(1.3); }
.scene-element[data-surface="bubble"]::after { content:""; position:absolute; inset:5px 10% auto; z-index:1; height:28%; border-radius:50%; background:linear-gradient(rgba(255,255,255,.2),transparent); filter:blur(5px); pointer-events:none; }

.scene-kicker { display:block; margin-bottom:clamp(4px,.7cqw,10px); color:var(--scene-violet-soft); font-size:clamp(10px,1cqw,16px); font-weight:800; letter-spacing:.03em; line-height:1.2; }
.scene-title { display:block; overflow:hidden; color:inherit; font-size:clamp(16px,2.1cqw,38px); font-weight:850; line-height:1.2; text-overflow:ellipsis; }
.scene-meta,.scene-description { color:var(--scene-muted); font-size:clamp(9px,.9cqw,15px); }
.scene-goal-source { display:block; margin-top:clamp(3px,.45cqh,8px); color:var(--scene-muted); font-size:clamp(8px,.75cqw,13px); line-height:1.2; }
.scene-empty { display:grid; place-items:center; min-height:50%; padding:10px; color:var(--scene-muted); text-align:center; }
.scene-overflow-count { display:block; margin-top:5px; color:var(--scene-muted); text-align:center; }
.account-avatar,.liker-avatar,.alert-avatar { flex:0 0 auto; display:grid; place-items:center; width:clamp(28px,3.4cqw,54px); aspect-ratio:1; border:1px solid rgba(255,255,255,.22); border-radius:50%; object-fit:cover; background:linear-gradient(135deg,var(--scene-violet),#38255f); color:#fff; font-weight:850; }
.platform-badge { display:inline-flex; align-items:center; padding:2px 6px; border:1px solid rgba(255,255,255,.13); border-radius:999px; color:var(--scene-muted); font-size:.7em; white-space:nowrap; }

/* Rankings */
.liker-list { display:grid; min-height:0; gap:clamp(5px,.75cqw,10px); }
.liker { position:relative; min-width:0; display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:clamp(5px,.8cqw,11px); padding:clamp(6px,.8cqw,11px); border:1px solid rgba(255,255,255,.09); border-radius:clamp(10px,1.3cqw,18px); background:rgba(255,255,255,.035); }
.liker > div { min-width:0; display:grid; }
.liker b,.liker small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.liker small { color:var(--scene-muted); font-size:.72em; }
.liker strong { color:var(--scene-violet-soft); font-size:clamp(12px,1.35cqw,22px); font-variant-numeric:tabular-nums; white-space:nowrap; }
.liker-rank { display:grid; place-items:center; width:clamp(22px,2.5cqw,36px); aspect-ratio:1; border-radius:50%; background:rgba(139,92,246,.2); color:#fff; font-weight:900; }
.scene-element[data-type="supporter-leaders"] .liker strong,.scene-element[data-type="supporter-leaders"] .scene-kicker { color:var(--scene-gold-soft); }
.scene-element[data-type="supporter-leaders"] .liker-rank { background:rgba(241,200,118,.2); color:var(--scene-gold-soft); }
.scene-element[data-variant="cards"] .liker-list { grid-auto-flow:column; grid-auto-columns:minmax(90px,1fr); }
.scene-element[data-variant="cards"] .liker { grid-template-columns:1fr; justify-items:center; text-align:center; }
.scene-element[data-variant="cards"] .liker-avatar { width:min(58%,72px); }
.scene-element[data-variant="podium"] .liker-list { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; padding-top:clamp(5px,1cqw,18px); }
.scene-element[data-variant="podium"] .liker { grid-template-columns:1fr; justify-items:center; min-height:62%; text-align:center; background:linear-gradient(180deg,rgba(139,92,246,.18),rgba(255,255,255,.035)); }
.scene-element[data-variant="podium"] .liker:nth-child(1) { order:2; min-height:100%; border-color:rgba(241,200,118,.46); background:linear-gradient(180deg,rgba(241,200,118,.2),rgba(139,92,246,.13)); }
.scene-element[data-variant="podium"] .liker:nth-child(2) { order:1; min-height:78%; }
.scene-element[data-variant="podium"] .liker:nth-child(3) { order:3; min-height:68%; }
.scene-element[data-variant="podium"] .liker-avatar { width:min(62%,76px); }
.scene-element[data-template="podium-top3"] .liker-list { grid-template-columns:repeat(3,minmax(0,1fr)); align-items:end; height:100%; }
.scene-element[data-template="bubble-row"] .liker-list,.scene-element[data-template="portrait-bubbles"] .liker-list { display:flex; align-items:center; justify-content:space-around; gap:clamp(6px,1cqw,16px); }
.scene-element[data-template="bubble-row"] .liker,.scene-element[data-template="portrait-bubbles"] .liker { display:flex; flex:1; max-width:130px; aspect-ratio:1; flex-direction:column; justify-content:center; padding:8px; border-radius:50%; background:radial-gradient(circle at 30% 18%,rgba(255,255,255,.24),rgba(139,92,246,.12) 48%,rgba(8,9,18,.7)); text-align:center; }
.scene-element[data-template="rank-ribbon"] .liker-list,.scene-element[data-template="horizontal-cards"] .liker-list,.scene-element[data-template="crown-cards"] .liker-list { grid-auto-flow:column; grid-auto-columns:minmax(120px,1fr); }
.scene-element[data-template="rank-ribbon"] .liker,.scene-element[data-template="horizontal-cards"] .liker,.scene-element[data-template="crown-cards"] .liker { grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; text-align:start; }
.scene-element[data-template="rank-ribbon"] .liker strong,.scene-element[data-template="horizontal-cards"] .liker strong,.scene-element[data-template="crown-cards"] .liker strong { grid-column:2; }
.scene-element[data-template="leader-highlight"] .liker:first-child,.scene-element[data-template="champion-list"] .liker:first-child { grid-row:span 4; min-height:100%; background:linear-gradient(145deg,rgba(241,200,118,.18),rgba(139,92,246,.12)); }
.scene-element[data-template="rotating-leader"] .liker:not(:first-child) { display:none; }

/* Board 01 ranking families: every template changes composition, not only color. */
.scene-element[data-template="podium-top3"] { padding:clamp(10px,1.5cqw,24px); background:radial-gradient(circle at 50% 118%,rgba(139,92,246,.28),transparent 45%),linear-gradient(160deg,rgba(23,24,39,.94),rgba(8,9,16,.96)); }
.scene-element[data-template="podium-top3"] .scene-kicker { margin:0 0 clamp(8px,1.2cqh,18px); padding:clamp(7px,.8cqh,12px); border:1px solid rgba(195,151,255,.44); border-radius:999px; background:linear-gradient(90deg,rgba(102,53,181,.5),rgba(151,91,235,.26),rgba(102,53,181,.5)); color:#fff; font-size:clamp(12px,1.5cqw,24px); text-align:center; }
.scene-element[data-template="podium-top3"] .liker { position:relative; display:flex; flex-direction:column; justify-content:flex-start; gap:clamp(3px,.5cqw,8px); min-height:55%; padding:clamp(8px,1cqw,16px); overflow:visible; border-color:rgba(198,166,255,.42); border-radius:48% 48% 17px 17px / 22% 22% 17px 17px; background:linear-gradient(180deg,rgba(170,112,255,.28),rgba(72,40,116,.22)); box-shadow:inset 0 1px rgba(255,255,255,.28),0 0 24px rgba(139,92,246,.18); }
.scene-element[data-template="podium-top3"] .liker::after { content:""; position:absolute; inset:auto -3px -3px; height:24%; border:1px solid rgba(222,194,255,.48); border-radius:50% 50% 14px 14px; background:linear-gradient(180deg,rgba(196,142,255,.26),rgba(80,45,128,.58)); box-shadow:0 0 18px rgba(159,92,244,.25); }
.scene-element[data-template="podium-top3"] .liker:nth-child(1) { order:2; min-height:86%; border-color:rgba(255,219,146,.74); background:linear-gradient(180deg,rgba(244,200,119,.34),rgba(112,66,153,.28)); box-shadow:inset 0 1px rgba(255,255,255,.35),0 0 28px rgba(241,200,118,.26); }
.scene-element[data-template="podium-top3"] .liker:nth-child(1)::before { content:"♛"; position:absolute; top:calc(-1 * clamp(22px,2.6cqw,40px)); color:var(--scene-gold-soft); font-size:clamp(22px,2.6cqw,40px); filter:drop-shadow(0 0 9px rgba(241,200,118,.6)); }
.scene-element[data-template="podium-top3"] .liker:nth-child(2) { order:1; min-height:68%; }
.scene-element[data-template="podium-top3"] .liker:nth-child(3) { order:3; min-height:60%; }
.scene-element[data-template="podium-top3"] .liker-avatar { z-index:2; width:clamp(44px,6cqw,92px); border:2px solid rgba(255,255,255,.64); box-shadow:0 0 18px rgba(183,140,255,.38); }
.scene-element[data-template="podium-top3"] .liker-rank { z-index:3; margin-top:calc(-1 * clamp(18px,2cqw,28px)); border:2px solid rgba(255,255,255,.58); background:linear-gradient(145deg,#fff4d2,#d39b37); color:#17131d; }
.scene-element[data-template="podium-top3"] .liker > div,
.scene-element[data-template="podium-top3"] .liker > strong { z-index:2; }
.scene-element[data-template="podium-top3"] .liker > strong { color:#fff; }

.scene-element[data-template="rank-ribbon"] .liker-list { display:grid; grid-template-columns:repeat(var(--visible-count,5),minmax(0,1fr)); gap:clamp(6px,1cqw,14px); }
.scene-element[data-template="rank-ribbon"] .liker { display:grid; grid-template-columns:1fr; justify-items:center; gap:4px; padding:clamp(7px,.9cqw,13px); border:0; border-radius:0; background:transparent; text-align:center; }
.scene-element[data-template="rank-ribbon"] .liker::before { content:""; position:absolute; inset:4% 7% 16%; border:1px solid rgba(218,203,247,.32); border-radius:50%; background:radial-gradient(circle at 30% 17%,rgba(255,255,255,.27),rgba(139,92,246,.12) 48%,rgba(5,6,12,.78)); box-shadow:inset 0 1px rgba(255,255,255,.24),0 0 22px rgba(139,92,246,.14); }
.scene-element[data-template="rank-ribbon"] .liker-avatar { z-index:2; width:min(58%,78px); }
.scene-element[data-template="rank-ribbon"] .liker-rank { z-index:3; position:absolute; top:0; min-width:26px; border:2px solid rgba(255,255,255,.54); background:linear-gradient(145deg,var(--scene-gold-soft),#a77228); color:#17131d; }
.scene-element[data-template="rank-ribbon"] .liker > div,
.scene-element[data-template="rank-ribbon"] .liker strong { z-index:2; grid-column:auto; }

.scene-element[data-template="horizontal-cards"] .liker-list,
.scene-element[data-template="crown-cards"] .liker-list { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(110px,1fr); overflow:hidden; }
.scene-element[data-template="horizontal-cards"] .liker,
.scene-element[data-template="crown-cards"] .liker { display:grid; grid-template-columns:auto minmax(0,1fr); grid-template-rows:auto auto; align-content:center; padding:clamp(8px,1cqw,15px); border-color:rgba(196,151,255,.34); border-radius:clamp(13px,1.5cqw,22px); background:radial-gradient(circle at 10% 10%,rgba(255,255,255,.16),transparent 32%),linear-gradient(145deg,rgba(109,65,182,.24),rgba(255,255,255,.025)); }
.scene-element[data-template="crown-cards"] .liker:first-child { border-color:rgba(241,200,118,.62); background:radial-gradient(circle at 10% 10%,rgba(255,244,209,.19),transparent 32%),linear-gradient(145deg,rgba(241,200,118,.2),rgba(93,54,125,.16)); }
.scene-element[data-template="crown-cards"] .liker:first-child::before { content:"♛"; position:absolute; top:4px; left:8px; color:var(--scene-gold-soft); }

.scene-element[data-template="bubble-row"] .liker,
.scene-element[data-template="portrait-bubbles"] .liker { position:relative; border:1px solid rgba(255,255,255,.34); box-shadow:inset 0 1px rgba(255,255,255,.34),inset 0 -18px 30px rgba(139,92,246,.12),0 12px 32px rgba(0,0,0,.28); }
.scene-element[data-template="portrait-bubbles"] { justify-content:flex-start; padding:4px 6px; }
.scene-element[data-template="portrait-bubbles"] .scene-kicker { flex:0 0 auto; margin:0 0 2px; font-size:clamp(8px,1cqw,13px); line-height:1.05; }
.scene-element[data-template="portrait-bubbles"] .liker-list { flex:1 1 0; min-height:0; height:0; gap:4px; }
.scene-element[data-template="portrait-bubbles"] .liker { min-width:0; max-width:none; height:100%; aspect-ratio:auto; min-height:0; padding:2px; gap:0; border-radius:13px; line-height:1.05; }
.scene-element[data-template="portrait-bubbles"] .liker-avatar { width:40%; min-width:13px; }
.scene-element[data-template="portrait-bubbles"] .liker-rank { position:absolute; inset:2px auto auto 3px; width:14px; min-width:14px; font-size:8px; }
.scene-element[data-template="portrait-bubbles"] .liker small { display:none; }
.scene-element[data-template="portrait-bubbles"] .liker b,.scene-element[data-template="portrait-bubbles"] .liker strong { max-width:100%; font-size:clamp(7px,1cqw,11px); line-height:1.05; }
.scene-element[data-template="bubble-row"] .liker::before,
.scene-element[data-template="portrait-bubbles"] .liker::before { content:""; position:absolute; inset:6% 15% auto; height:24%; border-radius:50%; background:linear-gradient(rgba(255,255,255,.34),transparent); filter:blur(3px); }
.scene-element[data-template="bubble-row"] .liker-avatar,
.scene-element[data-template="portrait-bubbles"] .liker-avatar { width:46%; border-color:rgba(255,255,255,.5); }

.scene-element[data-template="leader-highlight"] .liker-list,
.scene-element[data-template="champion-list"] .liker-list { grid-template-columns:minmax(150px,1.15fr) minmax(150px,1fr); grid-template-rows:repeat(4,minmax(0,1fr)); }
.scene-element[data-template="leader-highlight"] .liker:first-child,
.scene-element[data-template="champion-list"] .liker:first-child { grid-row:1/-1; grid-template-columns:1fr; justify-items:center; align-content:center; border-color:rgba(241,200,118,.58); border-radius:32px; text-align:center; }
.scene-element[data-template="leader-highlight"] .liker:first-child::before,
.scene-element[data-template="champion-list"] .liker:first-child::before { content:"♛"; position:absolute; top:8%; color:var(--scene-gold-soft); font-size:clamp(22px,3cqw,50px); filter:drop-shadow(0 0 10px rgba(241,200,118,.5)); }
.scene-element[data-template="leader-highlight"] .liker:first-child .liker-avatar,
.scene-element[data-template="champion-list"] .liker:first-child .liker-avatar { width:min(45%,100px); border:2px solid rgba(241,200,118,.75); box-shadow:0 0 24px rgba(241,200,118,.22); }
.scene-element[data-template="leader-highlight"] .liker:not(:first-child),
.scene-element[data-template="champion-list"] .liker:not(:first-child) { grid-template-columns:auto auto minmax(0,1fr) auto; padding-block:clamp(5px,.6cqh,9px); }

/* Goals */
.like-line { display:flex; align-items:end; justify-content:space-between; gap:12px; min-width:0; }
.like-line strong { min-width:0; overflow:hidden; font-size:clamp(20px,3.2cqw,54px); line-height:1; text-overflow:ellipsis; white-space:nowrap; }
.like-line strong small { font-size:.42em; color:var(--scene-muted); }
.like-track { height:clamp(8px,1cqh,16px); margin-top:clamp(8px,1.2cqh,16px); overflow:hidden; border:1px solid rgba(255,255,255,.13); border-radius:999px; background:rgba(255,255,255,.08); }
.like-track i { display:block; width:var(--progress,0); height:100%; border-radius:inherit; background:linear-gradient(90deg,var(--scene-violet),#d2b4ff 70%,var(--scene-gold)); box-shadow:0 0 20px rgba(154,102,255,.55); }
.like-ring { display:flex; align-items:center; justify-content:center; gap:clamp(10px,2cqw,30px); }
.like-ring > i { position:relative; display:grid; place-items:center; width:min(32cqh,38cqw); aspect-ratio:1; border-radius:50%; background:conic-gradient(var(--scene-violet) var(--progress-angle),rgba(255,255,255,.08) 0); font-style:normal; }
.like-ring > i::after { content:""; position:absolute; inset:8%; border-radius:50%; background:var(--scene-surface); }
.like-ring > i strong { position:relative; z-index:1; }
.like-ring > div { display:grid; }
.like-ring > div b { font-size:clamp(18px,3cqw,48px); }
.like-ring > div span { color:var(--scene-muted); }
.like-segments { display:grid; grid-template-columns:repeat(10,1fr); gap:4px; margin-top:10px; }
.like-segments i { height:clamp(8px,1.2cqh,16px); border-radius:999px; background:rgba(255,255,255,.08); }
.like-segments i.active { background:linear-gradient(90deg,var(--scene-violet),var(--scene-violet-soft)); box-shadow:0 0 12px rgba(154,102,255,.5); }
.like-arc { display:grid; place-items:center; height:100%; }
.like-arc > i { position:absolute; width:min(70cqh,70cqw); aspect-ratio:1; border-radius:50%; background:conic-gradient(var(--scene-violet) var(--progress-angle),rgba(255,255,255,.08) 0); -webkit-mask:radial-gradient(circle,transparent 58%,#000 59%); mask:radial-gradient(circle,transparent 58%,#000 59%); }
.like-arc > span { position:relative; display:grid; place-items:center; text-align:center; }
.like-arc strong { font-size:clamp(22px,4cqw,58px); }

/* Comments, identity and alerts */
.scene-comments { display:grid; gap:clamp(5px,.8cqw,10px); min-height:0; overflow:hidden; }
.scene-comment { display:grid; grid-template-columns:auto minmax(0,1fr); align-items:start; gap:clamp(7px,1cqw,13px); min-width:0; padding:clamp(7px,.9cqw,12px); border-radius:clamp(10px,1.3cqw,18px); background:rgba(255,255,255,.045); }
.scene-comment > div { min-width:0; }
.scene-comment b { display:flex; align-items:center; gap:6px; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scene-comment p { display:-webkit-box; margin:2px 0 0; overflow:hidden; color:var(--scene-text); font-size:clamp(10px,1.05cqw,17px); -webkit-line-clamp:2; -webkit-box-orient:vertical; }
.scene-alert,.scene-result,.scene-realm-news { display:flex; align-items:center; gap:clamp(10px,1.4cqw,20px); min-width:0; }
.scene-alert > i,.scene-result > i,.scene-realm-news > i { display:grid; place-items:center; flex:0 0 auto; width:clamp(38px,5.2cqw,72px); aspect-ratio:1; border-radius:50%; background:linear-gradient(135deg,var(--scene-violet),#3d226b); color:#fff; font-size:clamp(18px,2.4cqw,34px); font-style:normal; box-shadow:0 0 26px rgba(154,102,255,.34); }
.scene-alert > div,.scene-result > div,.scene-realm-news > div { min-width:0; display:grid; }
.scene-alert strong { overflow:hidden; font-size:clamp(15px,2cqw,32px); text-overflow:ellipsis; white-space:nowrap; }
.scene-alert small { color:var(--scene-muted); }
.scene-accounts { display:grid; gap:8px; }
.scene-account { display:grid; grid-template-columns:auto auto minmax(0,1fr) auto; align-items:center; gap:9px; min-width:0; }
.scene-account > div { min-width:0; display:grid; }
.scene-account b,.scene-account small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.scene-account small { color:var(--scene-muted); }
.platform-icon { display:grid; place-items:center; width:24px; aspect-ratio:1; border-radius:50%; background:rgba(255,255,255,.08); font-size:11px; }
.scene-streamer-avatar { display:grid; place-items:center; height:100%; text-align:center; }
.scene-streamer-avatar img { width:min(72cqh,72cqw); aspect-ratio:1; border:2px solid rgba(255,255,255,.28); border-radius:50%; object-fit:cover; }
.scene-streamer-avatar b { margin-top:8px; font-size:clamp(14px,2cqw,30px); }
.scene-counter { display:grid; place-items:center; text-align:center; }
.scene-counter strong { font-size:clamp(24px,5cqw,76px); line-height:1; font-variant-numeric:tabular-nums; }
.scene-counter small { color:var(--scene-muted); }
.scene-team-score { display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:clamp(8px,1.5cqw,24px); text-align:center; }
.scene-team-score span { display:grid; padding:clamp(8px,1cqw,14px); border:1px solid var(--scene-border); border-radius:14px; background:rgba(255,255,255,.035); }
.scene-team-score span:last-child { border-color:rgba(241,200,118,.35); }
.scene-team-score strong { font-size:clamp(24px,4cqw,64px); }
.scene-team-score > b { color:var(--scene-gold); font-size:clamp(16px,2cqw,32px); }
.scene-news-ticker { display:flex; align-items:center; gap:clamp(20px,3cqw,50px); white-space:nowrap; animation:scene-ticker var(--leader-speed,14s) linear infinite; }
.scene-news-ticker > span { display:inline-flex; align-items:center; gap:8px; }
.scene-news-ticker i { color:var(--scene-gold); font-style:normal; }
.scene-news-ticker em { color:var(--scene-muted); font-style:normal; }
.scene-custom-image { width:100%; height:100%; object-fit:contain; }
.scene-game-frame { display:block; width:100%; height:100%; border:0; background:transparent; }
.scene-element[data-type="game"] { padding:0; border:0; background:transparent; box-shadow:none; backdrop-filter:none; overflow:visible; }
.scene-game-guide { display:grid; place-items:center; width:100%; height:100%; border:2px dashed rgba(183,140,255,.4); border-radius:18px; color:var(--scene-muted); text-align:center; }
.scene-game-guide b { color:var(--scene-text); }
.scene-effect { position:absolute; inset:0; pointer-events:none; }
.scene-effect i { position:absolute; left:calc((var(--particle) * 37) % 100 * 1%); top:calc((var(--particle) * 53) % 100 * 1%); color:var(--scene-violet-soft); font-style:normal; animation:scene-particle calc(2s + var(--particle)*.08s) ease-in-out infinite alternate; }

.scene-element[data-animation="float"] { animation:scene-float var(--motion-duration,4s) ease-in-out infinite; }
.scene-element[data-animation="pulse"] { animation:scene-pulse var(--motion-duration,2.4s) ease-in-out infinite; }
.scene-element[data-animation="enter"] { animation:scene-enter .55s cubic-bezier(.22,1,.36,1) both; }
/* These are the values exposed in the editor.  They used to be absent from
   the stylesheet, which made the UI claim an animation was selected while
   nothing moved in either preview or the published overlay. */
.scene-element[data-animation="fade"] { animation:scene-fade var(--motion-duration,3s) ease-in-out infinite alternate; }
.scene-element[data-animation="slide"] { animation:scene-slide var(--motion-duration,5s) cubic-bezier(.45,0,.2,1) infinite alternate; }
.scene-element[data-animation="rotate"] { animation:scene-leader-swap var(--motion-duration,6s) ease-in-out infinite; }
.mellow-scene[data-reduced-motion="true"] * { animation:none!important; transition:none!important; }
@keyframes scene-ticker { to { transform:translateX(55%); } }
@keyframes scene-float { 50% { transform:translateY(-5px); } }
@keyframes scene-pulse { 50% { filter:brightness(1.12); } }
@keyframes scene-enter { from { opacity:0; transform:translateY(16px) scale(.98); } }
@keyframes scene-particle { to { transform:translateY(-18px) rotate(14deg); opacity:.3; } }
@keyframes scene-fade { from { opacity:.45; } to { opacity:1; } }
@keyframes scene-slide { from { transform:translateX(0); } to { transform:translateX(clamp(-12px,-1.6cqw,-4px)); } }
@keyframes scene-leader-swap { 0%,18% { transform:translateY(0) scale(1); } 45% { transform:translateY(-2px) scale(1.012); } 65% { transform:translateY(0) scale(1); } 100% { transform:translateY(0) scale(1); } }
@keyframes scene-background-drift { to { background-position:50px 58px,-36px 90px,106px -40px,-60px 108px,0 0,0 0; } }
@keyframes scene-background-breathe { to { transform:scale(1.06) translate3d(1%,-1%,0); filter:saturate(1.15); } }
@keyframes scene-stars-twinkle { 50% { opacity:calc(var(--scene-background-opacity,1) * .46); filter:brightness(.86); } to { transform:scale(1.012); filter:brightness(1.16); } }
@keyframes scene-aurora-flow { to { transform:rotate(5deg) scale(1.22) translate3d(2%,-3%,0); filter:blur(42px) saturate(1.35); } }
@keyframes scene-waves-flow { to { transform:translate3d(4%,-3%,0) scale(1.04); } }
@keyframes scene-geometry-drift { to { background-position:160px -60px,-110px 80px; } }

@container (max-width: 520px) {
  .scene-element { padding:8px; }
  .scene-kicker { margin-bottom:3px; font-size:9px; }
  .liker { padding:5px; border-radius:9px; }
  .liker small,.platform-badge { display:none; }
  .scene-comment { padding:6px; }
  .scene-comment p { -webkit-line-clamp:1; }
}
@media (prefers-reduced-motion:reduce) {
  .mellow-scene * { animation:none!important; transition:none!important; }
}
@keyframes scene-loader-spin { to { transform: rotate(1turn); } }
