/* Critter Coin Chase — polished, readable nine-result Lucky Wheel.
   Keeps the existing server-authoritative stopping point and equal 40° slices. */
#boardWrap #wheelOverlay{
 background:
  radial-gradient(ellipse at 49% 42%,rgba(98,75,157,.43),transparent 59%),
  radial-gradient(ellipse at 50% 28%,#454374ed,#182448f7 71%);
 backdrop-filter:blur(7px);
}
#boardWrap #wheelOverlay .wheelPanel{
 position:relative;isolation:isolate;
 border:2px solid rgba(247,217,155,.42);
 border-radius:26px;
 background:linear-gradient(155deg,rgba(42,55,108,.94),rgba(25,29,70,.94));
 box-shadow:0 20px 65px #090c2a99,inset 0 2px 0 #ffffff25;
 padding:clamp(8px,1.5vmin,20px);
 gap:clamp(7px,1.2vmin,15px);
}
#boardWrap #wheelOverlay .wheelPanel:before{
 content:'';position:absolute;z-index:-1;inset:11px;
 border-radius:19px;border:1px solid #e8dba322;pointer-events:none;
}
#boardWrap #wheelOverlay .wheelTitle{
 color:#fff4d1;font-weight:1000;letter-spacing:.07em;
 font-size:clamp(21px,3.6vmin,37px);
 text-shadow:0 3px 12px #10152b8c;
}
#boardWrap #wheelOverlay .wheelStage{
 width:min(59vh,70vw,590px);max-height:calc(100% - 145px);
 filter:drop-shadow(0 16px 25px #0c1832bf);
}
#boardWrap #wheelOverlay #wheelCanvas{
 border:7px solid #f7df9c;
 box-shadow:0 0 0 5px #755284,0 0 0 8px #f2c675,0 15px 40px #0d113bbd,inset 0 0 20px #fff7cd;
}
#boardWrap #wheelOverlay .wheelPointer{
 border-left:20px solid transparent;border-right:20px solid transparent;
 border-top:51px solid #fff1c4;top:-19px;
 filter:drop-shadow(0 4px 4px #151b3a);
}
#boardWrap #wheelOverlay .wheelHub{
 box-shadow:0 2px 14px #130f3b88;
}
#boardWrap #wheelOverlay .wheelResult{
 color:#fff4d1;border-color:#e9d09c;
 background:linear-gradient(125deg,#283a69,#3f5087);
 text-shadow:0 2px 4px #0d1933;
 border-width:2px;font-size:clamp(14px,2.25vmin,24px);
 padding:9px 19px;line-height:1.26;
}
#boardWrap #wheelOverlay .wheelResult.landed{
 color:#293951;background:linear-gradient(115deg,#fff0b0,#f7cd7e,#fff0b0);
 box-shadow:0 0 22px #ffda8a80,0 9px 24px #1d1c4655;
 text-shadow:none;
}
#boardWrap #wheelOverlay .wheelAction{
 border:2px solid #ffefb5;border-radius:15px;
 min-height:51px;min-width:min(330px,85%);
 font-size:clamp(15px,2.4vmin,25px);font-weight:950;
 color:#24465b;background:linear-gradient(135deg,#ffe49c,#f7b659);
 box-shadow:0 4px 0 #ae722c,0 10px 24px #070d3570;
}
#boardWrap #wheelOverlay .wheelAction:active{transform:translateY(3px);box-shadow:0 1px 0 #ae722c}
@media(max-width:650px){
 #boardWrap #wheelOverlay .wheelPanel{padding:6px;gap:5px}
 #boardWrap #wheelOverlay .wheelStage{width:min(53vh,70vw,290px);max-height:calc(100% - 108px)}
 #boardWrap #wheelOverlay .wheelTitle{font-size:clamp(15px,4vw,23px)}
 #boardWrap #wheelOverlay .wheelResult{padding:5px 8px;font-size:clamp(11px,2.8vw,15px)}
 #boardWrap #wheelOverlay .wheelAction{min-height:36px;font-size:clamp(12px,3vw,16px)}
}
@media(prefers-reduced-motion:reduce){#boardWrap #wheelOverlay .wheelResult.landed{animation:none}}


/* 2026 premium Lucky Wheel presentation. Keeps wheel geometry and spin maths intact. */
#boardWrap #wheelOverlay{
 isolation:isolate;
 background:
  radial-gradient(ellipse at 50% 55%,#5b4aa864 0%,transparent 56%),
  radial-gradient(circle at 16% 15%,#6789cd28 0%,transparent 27%),
  radial-gradient(circle at 87% 82%,#d18bdf20 0%,transparent 28%),
  linear-gradient(158deg,#171b49f8 0%,#21245af9 52%,#101635fc 100%);
}
#boardWrap #wheelOverlay .wheelPanel{
 width:min(100%,1040px);height:100%;max-height:100%;
 justify-content:center;
 padding:clamp(10px,2.1vmin,27px);
 gap:clamp(6px,1.15vmin,14px);
 border:2px solid #f5dc9b7d;
 border-radius:clamp(20px,2.8vmin,34px);
 background:
  radial-gradient(circle at 50% 42%,#5963a04a,transparent 66%),
  linear-gradient(155deg,#283a71ee,#171d4aef 78%);
 box-shadow:inset 0 2px 0 #ffffff3a,inset 0 -2px 0 #050d3960,0 21px 70px #050b2eb8;
}
#boardWrap #wheelOverlay .wheelPanel::before{
 inset:10px;border:1px solid #fff0bd40;border-radius:clamp(14px,2.2vmin,26px);
 background:radial-gradient(circle at 8% 18%,#fff9dd80 0 1.3px,transparent 2px),
 radial-gradient(circle at 92% 26%,#fff9dd91 0 1.5px,transparent 2px),
 radial-gradient(circle at 17% 84%,#fff9dd61 0 1px,transparent 2px),
 radial-gradient(circle at 80% 74%,#fff9dd62 0 1.5px,transparent 2px);
 pointer-events:none;
}
#boardWrap #wheelOverlay .wheelTitle{
 position:relative;z-index:2;margin:0;
 font:1000 clamp(19px,3.2vmin,42px)/1.08 system-ui;
 letter-spacing:.055em;color:#fff5cf;text-transform:uppercase;
 text-shadow:0 3px 0 #46335d,0 7px 20px #060a2e;
}
#boardWrap #wheelOverlay .wheelTitle::after{
 content:'';display:block;width:min(130px,26%);height:3px;
 background:linear-gradient(90deg,transparent,#fff1ad,transparent);
 margin:clamp(5px,1vmin,11px) auto 0;border-radius:999px;
}
#boardWrap #wheelOverlay .wheelStage{
 position:relative;
 width:min(61vmin,64vw,600px);
 max-width:calc(100% - 24px);
 max-height:calc(100% - 142px);
 aspect-ratio:1;flex:0 1 auto;
 filter:drop-shadow(0 24px 25px #070c30ac);
}
#boardWrap #wheelOverlay .wheelStage::before{
 content:'';position:absolute;inset:-2.6%;border-radius:50%;pointer-events:none;
 border:3px solid #fff1b4;
 box-shadow:0 0 0 4px #af774c,0 0 0 8px #69427f,0 0 35px #ffce7180,inset 0 0 16px #fff0b076;
 z-index:-1;
}
#boardWrap #wheelOverlay #wheelCanvas{
 border:7px solid #fce29b;
 box-shadow:0 0 0 4px #8a5686,0 0 0 8px #dca65a,0 18px 50px #050b2ac9,inset 0 0 18px #fff4c7;
}
#boardWrap #wheelOverlay .wheelPointer{
 z-index:5;top:-5%;width:clamp(24px,5vmin,53px);height:clamp(36px,7vmin,71px);
 border:0;clip-path:polygon(0 0,100% 0,91% 34%,50% 100%,9% 34%);
 background:linear-gradient(115deg,#fffce5 0%,#ffea99 32%,#d9973a 75%,#94522c 100%);
 filter:drop-shadow(0 4px 3px #100c34b0);
}
#boardWrap #wheelOverlay .wheelResult{
 order:0;z-index:3;flex:0 0 auto;
 width:auto;max-width:min(92%,820px);min-height:44px;max-height:none;
 margin:0;padding:clamp(8px,1.4vmin,15px) clamp(16px,2.6vmin,28px);
 border:2px solid #f4d995;border-radius:999px;
 background:linear-gradient(135deg,#1e3469,#3c467f);
 color:#fff5ce;font:950 clamp(15px,2.15vmin,27px)/1.2 system-ui;
 text-shadow:0 2px 5px #08102f;
 box-shadow:inset 0 2px 0 #ffffff30,0 6px 22px #070a2e8a;
 overflow-wrap:break-word;
}
#boardWrap #wheelOverlay .wheelResult.landed{
 border:3px solid #fff6c6;border-radius:23px;
 color:#332447;background:linear-gradient(135deg,#fff7cf 0%,#ffd478 54%,#fff0aa 100%);
 text-shadow:none;box-shadow:0 0 0 6px #ffe7a22b,0 10px 37px #ffba677a;
 animation:cccWheelPrizeReveal .55s cubic-bezier(.18,1.25,.32,1) both;
}
@keyframes cccWheelPrizeReveal{
 from{opacity:.5;transform:translateY(8px) scale(.9)}
 70%{opacity:1;transform:translateY(-2px) scale(1.045)}
 to{opacity:1;transform:translateY(0) scale(1)}
}
#boardWrap #wheelOverlay .wheelAction{
 position:relative;z-index:3;min-height:clamp(40px,5.6vmin,58px);
 min-width:min(320px,82%);max-width:92%;
 border:2px solid #fff0bd;border-radius:18px;
 background:linear-gradient(135deg,#fff1ad,#ffc66d 65%,#e9a343);
 color:#263b59;font:1000 clamp(14px,2.3vmin,24px)/1.15 system-ui;
 box-shadow:0 5px 0 #a46a31,0 12px 28px #070b318a;
}
@media(max-width:650px),(max-height:580px){
 #boardWrap #wheelOverlay .wheelPanel{padding:6px;gap:4px}
 #boardWrap #wheelOverlay .wheelTitle{font-size:clamp(14px,3.6vmin,24px)}
 #boardWrap #wheelOverlay .wheelTitle::after{margin:4px auto 0}
 #boardWrap #wheelOverlay .wheelStage{
  width:min(52vmin,65vw,390px);
  max-height:calc(100% - 102px);
 }
 #boardWrap #wheelOverlay .wheelResult{
  min-height:30px;padding:5px 12px;font-size:clamp(11px,2.4vmin,16px)
 }
 #boardWrap #wheelOverlay .wheelAction{min-height:34px;font-size:clamp(12px,2.7vmin,17px)}
}
@media(prefers-reduced-motion:reduce){
 #boardWrap #wheelOverlay .wheelResult.landed{animation:none}
}


/* Wheel 2.0 — true contained fit for BOTH board-only fullscreen and the
   normal windowed TV dashboard. Size against the actual overlay, not viewport. */
#boardWrap #wheelOverlay{
 container-type:size;
 overflow:hidden;
 padding:clamp(5px,1.2vmin,14px)!important;
 background:
 radial-gradient(circle at 50% 50%,#5067a455 0%,transparent 57%),
 radial-gradient(circle at 21% 17%,#c9a4ff27,transparent 30%),
 radial-gradient(circle at 85% 82%,#3ee8d626,transparent 26%),
 linear-gradient(150deg,#0c153c,#1b285a 50%,#0d1236)!important;
}
#boardWrap #wheelOverlay .wheelPanel{
 width:100%!important;height:100%!important;max-height:100%!important;
 min-height:0!important;box-sizing:border-box;
 display:flex!important;flex-direction:column!important;align-items:center!important;
 justify-content:center!important;overflow:hidden!important;
 gap:clamp(3px,1cqh,12px)!important;
 padding:clamp(6px,1.5cqh,17px)!important;
 border:1px solid #ffe9bb88!important;
 background:
 radial-gradient(ellipse at 50% 48%,#6d5ea348,transparent 60%),
 linear-gradient(155deg,#1d2e66ed,#101b47f2)!important;
 box-shadow:inset 0 0 0 2px #ffffff18,0 14px 38px #050b25aa!important;
}
#boardWrap #wheelOverlay .wheelTitle{
 flex:0 0 auto;max-width:95%;
 font-size:clamp(15px,4.5cqh,36px)!important;
 line-height:1.08!important;letter-spacing:.04em!important;
 margin:0!important;
}
#boardWrap #wheelOverlay .wheelTitle::after{
 margin:clamp(2px,.7cqh,7px) auto 0!important;
}
#boardWrap #wheelOverlay .wheelResult{
 flex:0 0 auto!important;max-width:92%!important;
 min-height:0!important;
 margin:0!important;
 padding:clamp(4px,1.1cqh,10px) clamp(10px,2.1cqw,22px)!important;
 font-size:clamp(12px,3.3cqh,24px)!important;
 line-height:1.15!important;border-radius:16px!important;
}
#boardWrap #wheelOverlay .wheelStage{
 flex:0 1 auto!important;
 box-sizing:border-box!important;
 display:block!important;
 width:min(72cqh,71cqw,560px)!important;
 height:min(72cqh,71cqw,560px)!important;
 min-height:0!important;
 max-width:none!important;
 max-height:none!important;
 aspect-ratio:1!important;margin:0 auto!important;
 position:relative!important;
 filter:drop-shadow(0 12px 22px #030a2980)!important;
}
#boardWrap #wheelOverlay #wheelCanvas{
 box-sizing:border-box!important;width:100%!important;height:100%!important;
 border:clamp(3px,.85cqh,7px) solid #ffe6a0!important;
 box-shadow:0 0 0 3px #8b5f92,0 0 0 6px #d5a258,
             0 0 22px #fcd17b70,0 16px 34px #050824af!important;
}
#boardWrap #wheelOverlay .wheelStage::before{
 inset:-1.5%!important;
 border:2px solid #ffe39e!important;
 box-shadow:0 0 0 4px #8c4c82,0 0 16px #ffe8a07d!important;
}
#boardWrap #wheelOverlay .wheelPointer{
 top:-3.3%!important;
 width:clamp(17px,5cqh,38px)!important;
 height:clamp(24px,7cqh,55px)!important;
 z-index:5!important;
 background:linear-gradient(110deg,#fff9da 0%,#ffd976 45%,#ab6633 100%)!important;
 filter:drop-shadow(0 4px 4px #181231a9)!important;
}
#boardWrap #wheelOverlay .wheelAction{
 flex:0 0 auto!important;min-height:clamp(32px,6cqh,52px)!important;
 padding:clamp(5px,1cqh,10px) 22px!important;
 font-size:clamp(12px,3cqh,22px)!important;
}
#boardWrap #wheelOverlay .wheelResult.landed{
 border-radius:16px!important;
 box-shadow:0 0 0 4px #ffe4a238,0 0 32px #ffbc658c!important;
}
@container (max-height: 440px){
 #wheelOverlay .wheelPanel{gap:2px!important}
 #wheelOverlay .wheelStage{width:min(66cqh,70cqw,380px)!important;height:min(66cqh,70cqw,380px)!important}
 #wheelOverlay .wheelTitle{font-size:clamp(12px,4cqh,20px)!important}
 #wheelOverlay .wheelResult{font-size:clamp(10px,3cqh,15px)!important}
}

/* Fullscreen board wheel: the floating standings occupy the lower part of
   the viewport. Size the wheel's *containing overlay* above those cards,
   so its wheel, result text and pointer stay completely unobstructed. */
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden){
 top:0!important;
 bottom:calc(var(--ccc-board-standings-height, 156px) + 12px)!important;
 height:auto!important;
 max-height:none!important;
 min-height:0!important;
 box-sizing:border-box!important;
}
/* The wheel already uses container query height, so restricting the overlay
   automatically scales the wheel down, rather than clipping its lower rim. */
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelPanel{
 min-height:0!important;
 max-height:100%!important;
}
@media(max-height:700px){
 body.tv.board-only #boardWrap #wheelOverlay:not(.hidden){
  bottom:calc(var(--ccc-board-standings-height, 156px) + 7px)!important;
 }
 body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelStage{
  width:min(65cqh,69cqw,520px)!important;
  height:min(65cqh,69cqw,520px)!important;
 }
}

/* Fullscreen Wheel Showcase: one uninterrupted game-show screen.
   The existing wheelOverlay .hidden state controls entry/exit, so standings
   and board chrome return automatically after the result sequence ends. */
body.tv.board-only:has(#wheelOverlay:not(.hidden)) #raceShowcaseScore,
body.tv.board-only:has(#wheelOverlay:not(.hidden)) #boardRoomCode,
body.tv.board-only:has(#wheelOverlay:not(.hidden)) #cccActiveTurn,
body.tv.board-only:has(#wheelOverlay:not(.hidden)) #moveSpeedOverlay{
 visibility:hidden!important;
 opacity:0!important;
 pointer-events:none!important;
}
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden){
 inset:0!important;
 top:0!important;
 right:0!important;
 bottom:0!important;
 left:0!important;
 width:100%!important;
 height:100%!important;
 max-height:100%!important;
 min-height:0!important;
 padding:clamp(8px,1.2vmin,18px)!important;
 z-index:45!important;
}
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelPanel{
 width:100%!important;
 height:100%!important;
 max-width:none!important;
 max-height:100%!important;
 justify-content:center!important;
 gap:clamp(5px,.9cqh,13px)!important;
 padding:clamp(8px,1.3cqh,20px)!important;
}
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelStage{
 width:min(69cqh,80cqw,760px)!important;
 height:min(69cqh,80cqw,760px)!important;
 max-width:calc(100% - 24px)!important;
 max-height:calc(100% - 142px)!important;
 flex:0 1 auto!important;
}
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelTitle{
 font-size:clamp(23px,4.6cqh,53px)!important;
}
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelResult{
 max-width:min(92%,860px)!important;
 font-size:clamp(15px,2.8cqh,29px)!important;
}
body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelResult.landed{
 border:3px solid #fff1b2!important;
 background:linear-gradient(135deg,#fff8d7,#ffd479 50%,#ffe9a9)!important;
 box-shadow:0 0 0 5px #ffdf9a33,0 0 38px #f5be6499,0 13px 30px #050d3580!important;
 animation:cccWheelPrizeReveal .55s cubic-bezier(.18,1.25,.32,1) both;
}
@media(max-height:760px){
 body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelStage{
  width:min(63cqh,77cqw,650px)!important;
  height:min(63cqh,77cqw,650px)!important;
  max-height:calc(100% - 114px)!important;
 }
 body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelTitle{
  font-size:clamp(19px,4cqh,41px)!important;
 }
}
@media(max-width:700px){
 body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelStage{
  width:min(62cqh,89cqw,480px)!important;
  height:min(62cqh,89cqw,480px)!important;
 }
}
@media(prefers-reduced-motion:reduce){
 body.tv.board-only #boardWrap #wheelOverlay:not(.hidden) .wheelResult.landed{
  animation:none!important;
 }
}
