/* Crisp and calm TV/phone visual language for the five new board spaces. */
.ccc-space-panel{padding:18px 16px;margin:10px 0;border-radius:20px;border:2px solid #e8cd85;background:linear-gradient(150deg,#26375d,#314c77 60%,#2d466d);box-shadow:0 12px 35px #050d2d65;color:#fff}
.ccc-space-heading{font-size:clamp(18px,3.6vw,27px);color:#ffebb4;text-align:center;font-weight:950;letter-spacing:.025em;margin:0 0 9px}
.ccc-space-description{font-size:clamp(13px,2.5vw,17px);line-height:1.45;margin:8px 0 15px;color:#f0f8ff}
.ccc-space-subhead{font-size:13px;color:#beeaff;margin:14px 0 8px;font-weight:850}
.ccc-space-caption{font-size:12px;opacity:.8;text-align:center}
.ccc-space-button{width:100%;min-height:55px;background:linear-gradient(135deg,#ffeba9,#f4be63);border:2px solid #fff5cf;border-radius:14px;color:#293b52;font-size:clamp(14px,3vw,18px);font-weight:900;padding:12px;cursor:pointer;box-shadow:0 4px 0 #94662c;white-space:normal;overflow-wrap:anywhere;margin:6px 0}
.ccc-space-button:disabled{opacity:.58;cursor:default;box-shadow:none}
.ccc-space-dice{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;max-width:560px;margin:14px auto}
.ccc-space-die{border:2px solid #a3e4f5;border-radius:13px;background:#233554;padding:10px;text-align:center}
.ccc-space-die-name{display:block;font-size:16px;overflow-wrap:anywhere}
.ccc-space-die-face{font-size:clamp(45px,10vw,84px);margin:4px 0;color:#fff7d5}
.ccc-space-die-note{font-size:12px;color:#c4e6fa}
.ccc-space-tv-event{pointer-events:none;position:fixed;z-index:280;top:12%;left:50%;width:min(640px,84vw);transform:translate(-50%,-30px) scale(.92);opacity:0;border:3px solid #f4d28f;border-radius:25px;background:linear-gradient(145deg,#263864ef,#384f7ef2);color:#fffbed;box-shadow:0 18px 55px #07142aaa;text-align:center;padding:20px 25px;transition:transform .35s ease,opacity .25s ease}
.ccc-space-tv-event.ccc-space-tv-visible{opacity:1;transform:translate(-50%,0) scale(1)}
.ccc-space-tv-symbol{font-size:58px}
.ccc-space-tv-title{color:#ffe8aa;font-size:clamp(21px,2.9vw,35px);font-weight:1000;margin:5px 0}
.ccc-space-tv-description{font-size:clamp(16px,2.4vw,23px);font-weight:800;line-height:1.25}
.ccc-space-tv-dice{display:flex;gap:16px;justify-content:center;margin-top:10px;flex-wrap:wrap}
.ccc-space-tv-result-die{border-radius:12px;border:1px solid #e2e6fd;background:#293e6c;padding:7px 15px;font-size:20px;font-weight:850}
@media(prefers-reduced-motion:reduce){.ccc-space-tv-event{transition:none}}

/* Odd-or-Even bonus die — shared TV reveal, independent of movement. */
.ccc-space-odd-dice-overlay{
 pointer-events:none;position:fixed;z-index:285;top:11%;left:50%;width:min(500px,76vw);
 transform:translateX(-50%);border:3px solid #f3dba9;border-radius:25px;
 padding:17px 24px 22px;background:linear-gradient(145deg,#23345dee,#3d4f83f2);
 color:#fff;box-shadow:0 20px 55px #050c32bd;text-align:center
}
.ccc-space-odd-title{font-size:clamp(19px,3vw,31px);font-weight:950;letter-spacing:.035em;color:#ffe8ab}
.ccc-space-odd-prediction{font-size:clamp(14px,2vw,20px);font-weight:850;color:#d0eef8;margin:10px 0}
/* Odd/Even uses the same glossy rounded white die and black pips as opening order. */
.ccc-space-odd-big-die{box-sizing:border-box;display:grid;place-items:center;width:clamp(100px,17vmin,164px);height:clamp(100px,17vmin,164px);padding:0;margin:12px auto;border:0;border-radius:24%;background:transparent;box-shadow:none;transform-origin:center}
.ccc-space-odd-die-face{box-sizing:border-box;position:relative;width:100%;height:100%;border:3px solid #fff;border-radius:22%;background:linear-gradient(145deg,#fff 5%,#fafafa 48%,#e2e2e2 100%);box-shadow:inset 3px 4px 9px #fff,inset -7px -8px 12px #b9bdc5,0 8px 12px #1c2a4873}
.ccc-space-odd-pip{position:absolute;width:16%;aspect-ratio:1;border-radius:50%;background:radial-gradient(circle at 32% 25%,#34383f 0%,#080b12 65%,#030409 100%);box-shadow:inset 1px 2px 2px #06070999,0 1px 1px #ffffff80;transform:translate(-50%,-50%)}
.ccc-space-odd-pip.tl{top:25%;left:25%}.ccc-space-odd-pip.tc{top:25%;left:50%}.ccc-space-odd-pip.tr{top:25%;left:75%}
.ccc-space-odd-pip.ml{top:50%;left:25%}.ccc-space-odd-pip.mc{top:50%;left:50%}.ccc-space-odd-pip.mr{top:50%;left:75%}
.ccc-space-odd-pip.bl{top:75%;left:25%}.ccc-space-odd-pip.bc{top:75%;left:50%}.ccc-space-odd-pip.br{top:75%;left:75%}
.ccc-space-odd-spinning{animation:ccc-odd-die-tumble .52s cubic-bezier(.45,.05,.55,.95) infinite alternate}
@keyframes ccc-odd-die-tumble{from{transform:translateY(-8px) rotate(-16deg) scale(.94)}to{transform:translateY(5px) rotate(18deg) scale(1.06)}}
@media(max-height:560px){.ccc-space-odd-big-die{width:90px;height:90px;padding:0;margin:5px auto}}
.ccc-space-odd-result{font-size:clamp(16px,2.2vw,24px);font-weight:900;color:#ffe6a3;margin-top:7px}
.ccc-space-phone-rolling,.ccc-space-phone-reveal{font-size:clamp(65px,13vw,105px);line-height:1.25;text-align:center;filter:drop-shadow(0 6px 8px #121b32a8)}
.ccc-space-phone-rolling{animation:ccc-odd-spinning .68s ease-in-out infinite alternate}
@keyframes ccc-odd-spinning{from{transform:rotate(-16deg) scale(.92)}to{transform:rotate(16deg) scale(1.08)}}
@media(prefers-reduced-motion:reduce){.ccc-space-odd-spinning,.ccc-space-phone-rolling{animation:none}}

/* Explain Coin Clash throughout both steps; not just a disappearing landing toast. */
body.tv .ccc-clash-guide{
 width:min(660px,84vw)!important;
 max-height:48vh!important;
 padding:16px 22px!important;
 background:linear-gradient(145deg,#21385df2,#2d5680f0)!important;
 border-color:#ffe1a0!important;
 box-shadow:0 15px 42px #07142aaf!important;
}
.ccc-clash-guide-rules{
 margin:9px auto;
 color:#f1f8ff;
 font-size:clamp(15px,2vw,22px);
 font-weight:800;
 line-height:1.35;
}
.ccc-clash-guide-step{
 margin:8px auto 0;
 padding:8px 14px;
 border-radius:12px;
 background:#163753bd;
 color:#aaf5da;
 font-size:clamp(13px,1.7vw,19px);
 font-weight:900;
}
@media(max-height:570px){
 body.tv .ccc-clash-guide{padding:9px 15px!important;top:7%!important}
 body.tv .ccc-clash-guide .ccc-space-odd-title{font-size:20px!important}
 .ccc-clash-guide-rules{font-size:14px}
 .ccc-clash-guide-step{font-size:12px;padding:5px 10px}
}

/* Red or Black: readable phone decisions, cinematic TV suspense. */
.ccc-rb-pot{font-size:clamp(23px,4vw,38px);font-weight:1000;color:#ffdc82;text-align:center;margin:7px auto}
.ccc-rb-picks{display:grid;grid-template-columns:1fr 1fr;gap:12px;width:100%}
.ccc-rb-picks button{min-height:80px;font-size:clamp(20px,5vw,29px);border:3px solid #f4ebce}
.ccc-rb-picks button:first-child{background:linear-gradient(140deg,#ff6974,#ae1c37);color:#fff}
.ccc-rb-picks button:last-child{background:linear-gradient(140deg,#454958,#0b111b);color:#fff}
.ccc-rb-tv{position:fixed;z-index:10031;top:6%;left:50%;transform:translateX(-50%);
 width:min(720px,93vw);max-height:90dvh;overflow:hidden;box-sizing:border-box;
 display:flex;flex-direction:column;align-items:center;gap:10px;
 text-align:center;padding:clamp(13px,2.6vh,25px);
 background:linear-gradient(165deg,#18254f,#111a3e);
 border:3px solid #eed9a1;border-radius:25px;box-shadow:0 16px 65px #020715c7;
 color:#fff;pointer-events:none}
.ccc-rb-title{font-size:clamp(29px,4.4vw,52px);line-height:1.05;margin:0!important;color:#ffebba}
.ccc-rb-round{font-size:clamp(17px,2.1vw,24px);font-weight:900;color:#c5e8ff}
.ccc-rb-tv .ccc-rb-pot{font-size:clamp(26px,4vw,45px);margin:0}
.ccc-rb-wheel{height:min(39vh,300px);width:min(39vh,300px);max-width:75vw;aspect-ratio:1;
 display:grid;place-items:center;border:11px solid #f8d68b;border-radius:50%;
 background:#272337;box-shadow:0 0 0 7px #a67332,0 15px 35px #000b}
.ccc-rb-disc{height:100%;width:100%;border-radius:50%;display:grid;grid-template-columns:1fr 1fr;
 overflow:hidden;border:5px solid #ede9ef;box-sizing:border-box}
.ccc-rb-red,.ccc-rb-black{display:grid;place-items:center;font-size:clamp(32px,5vw,65px)}
.ccc-rb-red{background:#cc2638}.ccc-rb-black{background:#181925}
.ccc-rb-wheel.is-spinning .ccc-rb-disc{animation:ccc-red-black-spin .43s linear infinite}
@keyframes ccc-red-black-spin{to{transform:rotate(360deg)}}
.ccc-rb-status{font-size:clamp(19px,2.9vw,32px);font-weight:1000;line-height:1.18;color:#ffefc1;max-width:100%}
@media(max-height:600px){.ccc-rb-tv{top:3%;gap:4px;padding:8px 14px}.ccc-rb-wheel{height:min(32vh,200px);width:min(32vh,200px);border-width:6px}.ccc-rb-title{font-size:25px}.ccc-rb-status{font-size:19px}}
@media(prefers-reduced-motion:reduce){.ccc-rb-wheel.is-spinning .ccc-rb-disc{animation:none}}

/* The fixed gold pointer shows exactly which 50/50 colour wins.
   A single easing animation ends precisely with the server-chosen sector. */
.ccc-rb-wheel{position:relative!important;isolation:isolate;flex:0 0 auto}
.ccc-rb-pointer{
 position:absolute;z-index:4;top:-31px;left:50%;
 transform:translateX(-50%);color:#ffe7a2;
 font-size:clamp(35px,5vh,49px);line-height:1;
 text-shadow:0 3px 2px #17101a,0 0 11px #ffc45b;
 filter:drop-shadow(0 2px 2px #000b);pointer-events:none
}
.ccc-rb-red,.ccc-rb-black{
 font-size:clamp(18px,3vh,31px)!important;font-weight:1000;
 letter-spacing:.03em;text-shadow:0 2px 6px #000c
}
.ccc-rb-wheel.is-spinning .ccc-rb-disc{
 animation:ccc-rb-settle 2.55s cubic-bezier(.12,.56,.13,1) forwards!important
}
.ccc-rb-wheel.has-landed .ccc-rb-disc{
 transform:rotate(var(--rb-stop-angle))!important;
 animation:none!important
}
@keyframes ccc-rb-settle{
 from{transform:rotate(0deg)}
 to{transform:rotate(var(--rb-landing-angle))}
}
.ccc-rb-landed{
 position:absolute;z-index:5;bottom:-12px;left:50%;transform:translateX(-50%);
 font-size:clamp(14px,2.8vh,23px);font-weight:1000;
 color:#fff;background:#212e53;border:2px solid #ffe4a4;
 border-radius:25px;padding:5px 14px;white-space:nowrap;
 box-shadow:0 5px 12px #0009
}
.ccc-rb-landed.red{background:#9e233c}
.ccc-rb-landed.black{background:#121724}
@media(max-height:590px){
 .ccc-rb-pointer{top:-21px;font-size:32px}
 .ccc-rb-landed{bottom:-8px;padding:3px 8px}
}
@media(prefers-reduced-motion:reduce){
 .ccc-rb-wheel.is-spinning .ccc-rb-disc{
  animation:none!important;transform:rotate(var(--rb-stop-angle))!important
 }
}


/* Coin Clash results are text-only: never show a stray die on the left. */
body.tv .ccc-space-tv-event[data-kind="coin_clash"] .ccc-space-tv-symbol,
body.tv .ccc-space-tv-event[data-kind="coin_clash"] .duelFace,
body.tv .ccc-space-tv-event[data-kind="coin_clash"] .ccc-space-tv-dice,
body.tv .ccc-space-tv-event[data-kind="coin_clash"]::before{display:none!important}
body.tv .ccc-space-tv-event[data-kind="coin_clash"]{
 text-align:center!important;
}
body.tv .ccc-space-tv-event[data-kind="coin_clash"] .ccc-space-tv-title,
body.tv .ccc-space-tv-event[data-kind="coin_clash"] .ccc-space-tv-description{
 width:100%;margin-left:auto;margin-right:auto;text-align:center!important;
}


/* Result cards should reward the eye without obscuring half the 3D playfield. */
body.tv.board-only .ccc-space-tv-event:not([data-kind="duel"]){
  box-sizing:border-box;width:max-content;max-width:min(64vw,570px);
  top:clamp(72px,10vh,105px);padding:12px 20px 15px;
  border-width:2px;border-radius:20px;
  box-shadow:0 12px 35px #071629b8;
}
body.tv.board-only .ccc-space-tv-event:not([data-kind="duel"]) .ccc-space-tv-symbol{
  font-size:clamp(25px,3vw,42px);line-height:1.1;
}
body.tv.board-only .ccc-space-tv-event:not([data-kind="duel"]) .ccc-space-tv-title{
  font-size:clamp(18px,2.25vw,29px);line-height:1.17;margin:4px 0 6px;
}
body.tv.board-only .ccc-space-tv-event:not([data-kind="duel"]) .ccc-space-tv-description{
  font-size:clamp(15px,1.65vw,22px);line-height:1.28;
  overflow-wrap:anywhere;
}
body.tv.board-only .ccc-space-tv-event[data-coin="loss"]{
  background:linear-gradient(135deg,#65304c,#863353);
  border-color:#ffcbcc;
}
body.tv.board-only .ccc-space-tv-event[data-coin="gain"]{
  background:linear-gradient(135deg,#214d4c,#26755d);
  border-color:#f8df93;
}
@media(max-width:950px),(max-height:680px){
 body.tv.board-only .ccc-space-tv-event:not([data-kind="duel"]){
  top:clamp(58px,9vh,80px);max-width:min(73vw,480px);padding:9px 13px;
 }
}

/* Odd/Even reveals use the one large dice result, not a second landing banner. */
body.tv.ccc-odd-even-result-active #app #tvLandingBanner,
body.tv.board-only.ccc-odd-even-result-active #app #tvLandingBanner{
 display:none!important;visibility:hidden!important;
}

/* Red or Black is a dedicated full-screen TV moment: never let a later
   landing/notification overlay cover the chosen colour or spinning wheel. */
body.tv #app .ccc-rb-tv{
 z-index:10055!important;
}
body.tv:has(.ccc-rb-tv) #app #tvLandingBanner{
 opacity:0!important;visibility:hidden!important;pointer-events:none!important;
}
body.tv:has(.ccc-rb-tv) #app #ccc-board-result-recovery{
 opacity:0!important;visibility:hidden!important;
}
