/* A small neon verdict on the glass, with identity-level winners that persist.
   Warm ivory identifies the winner; cyan/violet stays rooted in the KTV room. */
.round-center-controls{
  position:absolute;z-index:7;left:50%;top:calc(var(--tv-height,76px) + var(--tv-gap,8px) + 31%);
  transform:translate(-50%,-50%);width:min(58%,290px);display:grid;justify-items:center;gap:7px;
  pointer-events:none;
}
.round-center-controls[hidden]{display:none}
.round-center-controls > .round-verdict{position:relative;inset:auto;transform:none;width:100%;margin:0}
body.first-person-demo.at-table .table #round-primary{
  width:max-content;max-width:100%;min-height:44px;margin:0;padding:8px 16px;pointer-events:auto;touch-action:manipulation;
  border:1px solid #9eedf4;border-radius:13px;background:linear-gradient(150deg,#97faf2,#58c5e4);color:#083446;
  box-shadow:inset 0 1px 0 #e9ffffb3,0 3px 0 #206078,0 5px 12px #040a2280;
  font:800 14px/1.25 var(--font,sans-serif);text-align:center;text-shadow:none;white-space:normal;
}
body.first-person-demo.at-table .table #round-primary:disabled{background:#22283d;color:#b5b5c9;border-color:#868fab66;box-shadow:inset 0 1px 0 #e6f6ff14;cursor:default}
body.first-person-demo.at-table .table #round-primary:focus-visible{outline:2px solid #e7feff;outline-offset:3px}
body.first-person-demo.at-table .table #round-primary:active:not(:disabled){transform:translateY(1px);box-shadow:inset 0 1px 0 #e9ffffb3,0 2px 0 #206078}
body.first-person-demo.at-table .table #room-panel:has(#bid-controls[hidden]){border-color:transparent;background:none;box-shadow:none}
body.first-person-demo.at-table .table #room-panel:has(#bid-controls[hidden]) > #chat-control-slot{justify-self:start}
@container(max-height:430px){
  .round-center-controls{width:60%;gap:4px;top:calc(var(--tv-height,76px) + var(--tv-gap,8px) + 30%)}
  body.first-person-demo.at-table .table #round-primary{font-size:12px;padding:6px 10px;min-height:44px}
}
@container(max-height:355px){.round-center-controls{top:calc(72px + 31%)}}
@container(max-height:310px){.round-center-controls{top:calc(46px + 35%)}}
.round-verdict {
  --verdict-top:calc(var(--tv-height,76px) + var(--tv-gap,8px) + 29%);
  position:absolute;z-index:7;left:50%;top:calc(var(--verdict-top) + 2px);transform:translate(-50%,-50%);
  width:min(58%,290px);padding:4px 6px;display:grid;gap:3px;box-sizing:border-box;line-height:1.1;text-align:center;
  color:#fff3d5;border-block:1px solid #83eeed44;border-radius:12px;
  background:linear-gradient(90deg,#10182b00,#142239e8 15% 85%,#10182b00);
  text-shadow:0 1px 3px #070b19;pointer-events:none;user-select:none;
}
.round-verdict-heading{display:flex;justify-content:center;align-items:center;gap:4px;min-width:0}
.round-verdict-title{font-size:clamp(17px,4.5cqw,24px);font-weight:900;letter-spacing:.01em;white-space:nowrap}
.round-verdict-multiplier{padding:2px 3px;border-radius:4px;background:#632c5866;border:1px solid #ed9dde6b;font-size:9px;font-weight:800;color:#ffd6f5;white-space:nowrap}
.round-verdict-multiplier[hidden]{display:none}
.round-verdict-payouts{display:flex;justify-content:center;gap:10px;min-width:0}
.round-verdict-payouts > div{max-width:50%;font-size:clamp(10px,2.8cqw,13px)}
.round-verdict-winner,.round-verdict-loser{display:flex;justify-content:center;align-items:baseline;gap:6px;min-width:0}
.round-verdict-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.round-verdict-winner{font-size:clamp(11px,3.2cqw,17px);font-weight:800}
.round-verdict-gain{flex-shrink:0;color:#a6fcf1;font-variant-numeric:tabular-nums}
.round-verdict-loser{font-size:clamp(10px,2.6cqw,13px);color:#d1bbd4}
.round-verdict-loss{flex-shrink:0;font-variant-numeric:tabular-nums}
.round-verdict[data-perspective=lose]{border-color:#bc88ad66;background:linear-gradient(90deg,#21162c00,#291e35e8 15% 85%,#21162c00)}
.round-verdict[data-perspective=lose] .round-verdict-title{color:#efd5ed}
.round-verdict.is-celebrating{animation:round-verdict-win 2500ms ease-out both}
.round-verdict.is-loss-reveal{animation:round-verdict-loss 650ms ease-out both}
.round-result-burst{
  position:absolute;z-index:6;left:50%;top:calc(var(--tv-height,76px) + var(--tv-gap,8px) + 29%);
  transform:translate(-50%,-50%);width:min(48%,240px);height:120px;
  overflow:hidden;pointer-events:none;contain:layout paint;isolation:isolate;
}
.round-result-ring{position:absolute;inset:15% 10%;border:2px solid #9cfbed;border-radius:50%;opacity:0;animation:round-result-ring 950ms ease-out both;box-shadow:0 0 13px #66e7e055,inset 0 0 10px #ba9bef44}
.round-result-spark{--spark-angle:calc(var(--spark-index) * 30deg);position:absolute;left:50%;top:50%;width:4px;height:9px;border-radius:1px;background:#bafbf4;opacity:0;transform:rotate(var(--spark-angle));animation:round-result-spark 1250ms calc(var(--spark-index) * 19ms) ease-out both}
.round-result-spark:nth-child(3n){background:#dab6ff;height:5px;width:5px}
.round-result-spark:nth-child(3n + 1){background:#ffe7ac}
.round-result-burst-loss .round-result-ring{border-color:#b68faa;box-shadow:none;animation:round-result-loss-ring 650ms ease-out both}
body.first-person-demo.at-table .table .seats .seat.is-round-winner .seat-avatar{border-color:#ffe2a5;box-shadow:0 0 0 2px #4e726f,0 0 0 4px #93efeb55,0 0 18px #96f2e66b}
body.first-person-demo.at-table .table .seats .seat.is-round-winner .seat-name{color:#fff0ca}
body.first-person-demo.at-table .table .seats .seat.is-round-loser .seat-avatar{border-color:#a88ba5;box-shadow:0 0 0 2px #322739,0 3px 8px #06091880}
body.first-person-demo.at-table .table .seats .seat .seat-outcome{
  position:absolute;z-index:5;left:50%;top:calc(var(--portrait,var(--portrait-size,48px)) - 9px);
  transform:translateX(-50%);max-width:100%;width:max-content;padding:2px 5px;border-radius:8px;
  border:1px solid #86efe0;background:#163637;color:#e5fff4;font:800 10px/1.1 var(--font,sans-serif);
  white-space:nowrap;text-align:center;box-shadow:0 2px 4px #060b1880;pointer-events:none;
}
body.first-person-demo.at-table .table .seats .seat.is-round-loser .seat-outcome{background:#342838;color:#f2d8e9;border-color:#ad87a5}
body.first-person-demo.at-table .table[data-seat-count="5"] .seats .seat.is-you .seat-outcome{left:calc(var(--portrait) / 2);top:-4px;max-width:calc(var(--portrait) + 8px)}
@keyframes round-verdict-win{0%{filter:brightness(1.35);scale:.91}13%{filter:brightness(1.12);scale:1.06}25%,100%{filter:brightness(1);scale:1}}
@keyframes round-verdict-loss{0%{opacity:.4;translate:0 -4px}100%{opacity:1;translate:0 0}}
@keyframes round-result-ring{0%{opacity:0;scale:.45}15%{opacity:.9}100%{opacity:0;scale:1.4}}
@keyframes round-result-loss-ring{0%{opacity:.55;scale:1.08}100%{opacity:0;scale:.75}}
@keyframes round-result-spark{0%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-15px) rotate(0deg)}12%{opacity:1}100%{opacity:0;transform:rotate(var(--spark-angle)) translateY(-75px) rotate(180deg)}}
@container (max-height:365px){
  .round-verdict{width:60%;padding:5px 4px;gap:2px;--verdict-top:calc(var(--tv-height,76px) + var(--tv-gap,8px) + 29%)}
  .round-verdict-title{font-size:16px}.round-verdict-winner{font-size:11px}.round-verdict-loser{font-size:10px}
  .round-verdict-multiplier{font-size:8px;padding:1px 2px}
  .round-result-burst{height:90px}
}
@container (max-height:310px){
  .round-verdict{width:60%;padding:4px 3px;gap:2px;--verdict-top:calc(var(--tv-height,48px) + var(--tv-gap,4px) + 29%)}
  .round-verdict-title{font-size:14px}.round-verdict-winner{font-size:10px}.round-verdict-loser{font-size:9px}
  .round-verdict-heading{gap:2px}.round-verdict-multiplier{font-size:7px}
  .round-result-burst{top:calc(var(--tv-height,48px) + var(--tv-gap,4px) + 29%);height:70px}
  body.first-person-demo.at-table .table .seats .seat .seat-outcome{font-size:8px;padding:2px 3px;top:calc(var(--portrait,40px) - 8px)}
}
@container (min-width:600px) and (min-height:500px){
  .round-verdict{gap:6px;padding:10px 9px}
  body.first-person-demo.at-table .table .seats .seat .seat-outcome{font-size:12px;padding:3px 7px;top:calc(var(--portrait,72px) - 12px)}
}
body:is(.ktv-motion-off,.ktv-page-hidden) .round-result-burst{display:none}
body:is(.ktv-motion-off,.ktv-page-hidden) .round-verdict{animation:none!important}
@media(prefers-reduced-motion:reduce){.round-result-burst{display:none}.round-verdict{animation:none!important;transition:none!important}}

/* The called count, matching dice and verdict belong together on the glass. */
.round-call-summary{
  --call-accent:#9cf5e4;
  display:grid;gap:3px;min-width:0;margin-top:3px;padding-top:4px;
  border-top:1px solid #a1dfe42c;font-family:var(--font,sans-serif);
}
.round-call-summary[hidden]{display:none}
.round-call-summary[data-sufficient="false"]{--call-accent:#ffb8ca}
.round-call-comparison{display:flex;align-items:baseline;justify-content:center;gap:4px 10px;flex-wrap:wrap;min-width:0}
.round-call-comparison > strong{margin:0;font-size:clamp(12px,3.2cqw,16px);font-weight:800;line-height:1.25;font-variant-numeric:tabular-nums}
.round-call-bid{color:#e8eaff}
.round-call-actual{color:var(--call-accent)}
.round-call-detail{color:#bac5dc;font-size:clamp(10px,2.5cqw,12px);line-height:1.3}
.round-call-verdict{color:var(--call-accent);font-size:clamp(10px,2.7cqw,13px);font-weight:750;line-height:1.3}
@container(max-height:365px){
  .round-call-summary{margin-top:2px;padding-top:3px;gap:2px}
  .round-call-comparison{gap:2px 6px}
  .round-call-comparison > strong{font-size:11px}
  .round-call-detail,.round-call-verdict{font-size:10px;line-height:1.2}
}

/* Leave a clear result band between both revealed rows, even on short phones. */
body.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats{--far-cup-top:6px}
body.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats .seat:is(:nth-child(2),:nth-child(5)) .cup-space{top:68%}
/* Settlement uses the same viewport and table geometry as a live round. */
@container(max-width:430px){
  .round-center-controls{gap:5px;margin-top:4px}
  .round-center-controls .round-verdict{padding:4px;gap:2px}
  .round-center-controls .round-verdict-title{font-size:17px}
  .round-center-controls .round-verdict-payouts{gap:6px}
  .round-center-controls .round-verdict-payouts > div{font-size:11px;gap:3px}
  .round-center-controls .round-call-summary{margin-top:2px;padding-top:3px;gap:2px}
  .round-center-controls .round-call-comparison{gap:2px 6px}
  .round-center-controls .round-call-comparison > strong{font-size:12px}
  .round-center-controls .round-call-detail,.round-center-controls .round-call-verdict{font-size:10px;line-height:1.2}
}
@container(max-height:430px){
  .round-verdict{width:60%;padding:4px;gap:2px}
  .round-verdict-title{font-size:15px}
  .round-verdict-payouts{gap:6px}
  .round-verdict-payouts > div{font-size:10px;gap:3px}
  .round-call-summary{margin-top:2px;padding-top:3px;gap:2px}
  .round-call-comparison{gap:2px 6px}
  .round-call-comparison > strong{font-size:11px}
  .round-call-detail,.round-call-verdict{font-size:10px;line-height:1.2}
  body.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats{--cup:36px;--far-cup-top:6px;--call-height:19px;--cup-gap:3px}
  body.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats .seat:is(:nth-child(2),:nth-child(5)) .cup-space{top:69%}
}
@container(max-height:355px){.round-verdict{--verdict-top:calc(72px + 30%)}}
@container(max-height:310px){
  .round-verdict{--verdict-top:calc(46px + 35%)}
  body.first-person-demo.at-table .table[data-seat-count="5"].is-revealed .seats .seat:is(:nth-child(2),:nth-child(5)) .cup-space{top:74%}
}

/* A countdown is readable status, rather than a faded manual start target. */
body.first-person-demo.at-table .table #round-primary.is-auto-next:disabled{
  opacity:1;background:#183243;color:#a1fff3;border-color:#68dce57a;
  box-shadow:inset 0 1px 0 #dfffff14;font-variant-numeric:tabular-nums;
}


/* A compact KTV winner plaque. It sits on the table and leaves the television,
   avatars and chat reachable throughout the fixed presentation window. */
.round-center-controls .round-verdict{
  padding:9px 10px 8px;border:1px solid #eaca827d;border-radius:16px;gap:5px;
  background:radial-gradient(ellipse at 50% 0,#714d4e88,transparent 68%),linear-gradient(145deg,#282444f5,#131c34f5);
  box-shadow:inset 0 0 0 2px #172039,inset 0 0 24px #a6743328,0 4px 18px #070b2470,0 0 16px #83eaf217;
}
.round-verdict-crest{height:22px;display:flex;justify-content:center;align-items:center;gap:7px;transition:opacity .25s}
.round-verdict-star{display:block;font:900 26px/1 sans-serif;color:#ffe895;text-shadow:0 2px 0 #9a621e,0 0 12px #ffd17485;transform:rotate(-6deg)}
.round-verdict-wing{display:block;width:38px;height:17px;background:linear-gradient(#fff1b0,#d69a43);clip-path:polygon(0 2%,100% 38%,94% 56%,20% 34%,90% 66%,80% 83%,39% 66%,75% 100%,52% 100%,19% 71%);opacity:.95}
.round-verdict-wing-right{transform:scaleX(-1)}
.round-center-controls .round-verdict-title{
  font-size:clamp(22px,5.5cqw,32px);line-height:1.1;letter-spacing:.04em;color:#ffdf85;
  text-shadow:0 2px 0 #885421,0 3px 0 #231a2f,0 0 18px #ebb95438;
}
.round-center-controls .round-verdict-payouts{gap:8px}
.round-center-controls .round-verdict-winner{color:#fff0c8}
.round-center-controls .round-verdict-gain{color:#a5fff0}
.round-verdict.is-celebrating{animation:round-plaque-reveal 1450ms var(--result-elapsed,0ms) cubic-bezier(.18,.78,.22,1) both}
.round-verdict.is-loss-reveal{animation-delay:var(--result-elapsed,0ms)}
.round-verdict.is-transferring .round-verdict-crest{opacity:.65}
.round-result-ring{animation-delay:var(--result-elapsed,0ms)}
.round-result-spark{animation-delay:calc(var(--spark-index) * 19ms + var(--result-elapsed,0ms))}
.round-verdict[data-perspective=lose]{border-color:#bfa2d476;background:radial-gradient(ellipse at 50% 0,#72507555,transparent 70%),linear-gradient(145deg,#28223df5,#171b32f5)}
.round-verdict[data-perspective=lose] .round-verdict-crest{height:11px;opacity:.55}
.round-verdict[data-perspective=lose] .round-verdict-star{font-size:14px;color:#d0b4e2;text-shadow:0 0 10px #9a76ba44}
.round-verdict[data-perspective=lose] .round-verdict-wing{height:9px;background:#9f85b8}
.round-center-controls .round-verdict[data-perspective=lose] .round-verdict-title{font-size:clamp(19px,4.6cqw,27px);color:#e8d6f2;text-shadow:0 2px 0 #352443}
@keyframes round-plaque-reveal{
  0%{opacity:0;scale:.78;filter:brightness(1.45)}
  17%{opacity:1;scale:1.05;filter:brightness(1.2)}
  36%,100%{opacity:1;scale:1;filter:brightness(1)}
}

/* Coordinates are measured from the actual visible avatars. Fixed positioning
   avoids percentage guesses and remains accurate when the player is below the table. */
.round-coin-flight{position:fixed;inset:0;z-index:25;pointer-events:none;overflow:hidden;isolation:isolate}
.round-flying-coin{
  position:absolute;left:0;top:0;width:16px;height:16px;margin:-8px 0 0 -8px;border-radius:50%;box-sizing:border-box;
  border:2px solid #fff0a6;background:radial-gradient(circle at 33% 26%,#fff9c7 0 12%,#ffc74a 38%,#c58518 72%);
  box-shadow:inset 0 0 0 2px #e2a126,0 2px 0 #8b5c17,0 0 9px #ffd06e60;
  animation:round-coin-transfer var(--coin-duration,850ms) var(--coin-delay,0ms) cubic-bezier(.2,.55,.48,1) both;
  will-change:transform,opacity;
}
.round-flying-coin::after{content:'';position:absolute;inset:3px;border:1px solid #fff2a8;border-radius:50%}
@keyframes round-coin-transfer{
  0%{opacity:0;transform:translate(var(--coin-from-x),var(--coin-from-y)) scale(.65) rotateY(0deg)}
  8%{opacity:1}
  45%{opacity:1;transform:translate(calc(var(--coin-arc-x) + var(--coin-sway)),var(--coin-arc-y)) scale(1.12) rotateY(180deg)}
  89%{opacity:1}
  100%{opacity:0;transform:translate(var(--coin-to-x),var(--coin-to-y)) scale(.5) rotateY(360deg)}
}
.round-coin-arrival{
  position:fixed;z-index:24;pointer-events:none;left:var(--arrival-x);top:var(--arrival-y);
  width:var(--arrival-width);height:var(--arrival-height);transform:translate(-50%,-50%);
  border:2px solid #ffe5a9;border-radius:50%;opacity:0;
  animation:round-coin-arrival 1200ms var(--coin-arrival-delay,850ms) ease-out both;
}
@keyframes round-coin-arrival{
  0%{opacity:0;scale:.9;box-shadow:0 0 0 1px #ffe5a955,0 0 8px #ffd98c33}
  16%,50%{opacity:1;scale:1.06;box-shadow:0 0 0 3px #ffe5a944,0 0 22px #ffd98c99}
  33%{opacity:.3;scale:1}
  100%{opacity:0;scale:1.13;box-shadow:0 0 0 4px #ffe5a900,0 0 28px #ffd98c00}
}
@container(max-width:430px){
  .round-center-controls .round-verdict{padding:6px 7px;gap:4px}
  .round-verdict-crest{height:18px;gap:5px}
  .round-verdict-star{font-size:22px}.round-verdict-wing{width:28px;height:14px}
  .round-center-controls .round-verdict-title{font-size:23px}
  .round-center-controls .round-verdict[data-perspective=lose] .round-verdict-title{font-size:20px}
}
@container(max-height:430px){
  .round-center-controls .round-verdict{padding:5px 6px;gap:3px}
  .round-verdict-crest{height:13px}.round-verdict-star{font-size:17px}.round-verdict-wing{height:11px;width:24px}
  .round-center-controls .round-verdict-title{font-size:20px}
  .round-center-controls .round-verdict[data-perspective=lose] .round-verdict-title{font-size:18px}
}
body:is(.ktv-motion-off,.ktv-page-hidden) :is(.round-coin-flight,.round-coin-arrival){display:none}
@media(prefers-reduced-motion:reduce){
  .round-coin-flight,.round-coin-arrival{display:none}
  .round-verdict-crest,.round-verdict.is-celebrating{animation:none!important;transition:none!important}
}
