@import url('/themes/riskstudio-cc-v3/game.css');
@import url('/themes/riskstudio-cc-v4/tokens.css');
/* Safari derives its toolbar tint from the document's solid background.
   Keep this separate from the lobby gradient and the light game panels. */
:root,:root body.cc-experience{background-color:#08172f}
/* The approved orange header CTA from Website V3; game sizing is retained. */
:root .cc-experience :is(.primary,#scan){background:var(--cc-button-gradient);color:#fff;border:0;border-radius:10px;font-weight:var(--cc-primary-weight,700);box-shadow:0 5px 16px #ff82001c;transition:transform .18s,filter .18s,box-shadow .18s}
:root .cc-experience :is(.primary,#scan):hover:not(:disabled){filter:brightness(1.08);transform:translateY(-2px);box-shadow:0 7px 20px #ff82002e}
@media(prefers-reduced-motion:reduce){:root .cc-experience :is(.primary,#scan){transition:none}}

/* V4 mission actions share a clear touch target and visual hierarchy. */
#cc-lobby-actions{display:grid;grid-template-columns:minmax(0,1fr);gap:8px;margin-top:16px}
#intro :is(#start,#cc-lobby-actions>:is(button,a)){min-height:46px}
#intro #start{justify-content:space-between;padding:10px 16px}
#intro #cc-lobby-actions>:is(button,a){display:flex;align-items:center;justify-content:space-between;text-align:left;gap:8px;width:100%;margin:0;padding:10px 15px;text-decoration:none;border:1px solid #8ab3;border-radius:8px;background:#1238;color:#def;font-size:12px!important;line-height:1.3}
/* Introfilm tijdelijk verborgen; de speler blijft beschikbaar. */
#intro #cc-lobby-actions>#watch-film{display:none}
body.rs-mobile #intro #cc-lobby-actions>#lobby-mobile-link{display:none}
/* Keep the phone lobby focused; the in-game pause control remains available. */
body.rs-mobile .cc-v3-monitor,body.rs-mobile .header .rs-mobile-explore{display:none!important}
body.rs-mobile .header{grid-template-columns:minmax(0,1fr) auto}
#cc-lobby-actions>:is(button,a):is(:hover,:focus-visible){box-shadow:inset 0 0 0 1px #a6dcff}
#cc-lobby-actions svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:1.5}
#cc-v2-lobby #intro .cc-lobby-note{border-top:1px solid #8ab3;padding-top:16px;margin:20px 0 0;font-size:12px;line-height:1.65;color:#cde}
.cc-lobby-note a{color:#def;text-decoration:underline}
#intro #intro-help{grid-area:auto;order:0}

.cc-lobby-side{display:flex;flex-direction:column;grid-column:1/-1;gap:12px;min-width:0;padding:12px}
.cc-lobby-side .cc-v3-monitor{margin:0;padding:0;border:0;background:none;box-shadow:none}
.cc-lobby-side .cc-lobby-trial{margin-block-start:auto}
.rs-mobile .cc-trial-action{--cc-primary-weight:650}
body.rs-mobile .cc-lobby-side{margin-top:16px}
@media (min-width:1200px) and (pointer:fine),(min-width:1200px) and (pointer:none){
 body[data-state=intro] #cc-v2-lobby #intro,.cc-lobby-side{align-self:stretch}
 .cc-lobby-side{grid-column:3}
 .cc-lobby-side .cc-v3-resilience{margin-block:12px}
 .cc-lobby-side .cc-v3-company{padding-block:10px}
 .cc-lobby-side .cc-v3-feed-head{margin-top:12px}
 .cc-lobby-side .cc-v3-feed{min-height:174px}
 .cc-lobby-side .cc-v3-feed li{padding-block:8px}
}
@media (min-width:1200px) and (pointer:fine) and (max-height:950px),(min-width:1200px) and (pointer:none) and (max-height:950px){
 body[data-state=intro] #cc-v2-lobby #intro{padding-block:16px}
 .cc-v3-lobby #intro-title{margin-block:10px 14px}
 body[data-state=intro] .cc-v3-lobby #intro>p:first-of-type{margin-bottom:12px}
 body[data-state=intro] .cc-v3-lobby #intro .instructions{margin-bottom:16px}
 #cc-lobby-actions{margin-top:12px}
 #cc-v2-lobby #intro .cc-lobby-note{margin-top:14px;padding-top:12px}
}

/* Center Galaxy + 10px gap + 100px Guardian together. Reserve their width
   within the viewport while keeping the existing vertical space for controls. */
@media (max-width:1024px),(pointer:coarse){
 .cc-v3-stage{width:clamp(140px,calc(100svh - 500px),260px);margin:4px auto;max-width:calc(100vw - 130px);left:-55px;transform:none!important}
 .cc-v3-stage-head{display:none}
 .cc-v3-network{margin:0}
 .cc-v3-lobby .cc-v2-guardian{width:100px;height:min(170px,100%);bottom:0;right:-110px}
}
/* Let the Guardian overlap the outer edge so the phone Galaxy has more room. */
@media(orientation:portrait){
 body.rs-mobile .cc-v3-stage{width:clamp(140px,calc(100svh - 480px),290px);max-width:calc(100vw - 100px);left:-37.5px}
 body.rs-mobile .cc-v3-lobby .cc-v2-guardian{bottom:clamp(0px,calc(100% - 190px),45px);right:-75px}
}
@media (max-width:1024px) and (max-height:700px),(pointer:coarse) and (max-height:700px){
 #intro .cc-brand-eyebrow,body[data-state=intro] .cc-v3-lobby #intro>p:first-of-type{display:none!important}
 .cc-v3-lobby #intro-title{margin:0}
 .cc-v3-lobby .cc-v2-mission-facts{padding-bottom:6px;margin-bottom:6px}
 #cc-lobby-actions{gap:6px;margin-top:8px}
 #intro :is(#start,#cc-lobby-actions>:is(button,a)){min-height:44px}
}
@media (max-width:1024px) and (max-height:500px),(pointer:coarse) and (max-height:500px){
 .cc-v3-lobby #intro-title{font-size:21px}
 body[data-state=intro] .cc-v3-lobby #intro-title>span{display:inline}
}

@media (max-width:1024px) and (orientation:portrait),(pointer:coarse) and (orientation:portrait){body[data-state=intro] .cc-v3-lobby{display:block}}
@media (max-width:1024px) and (max-height:500px),(pointer:coarse) and (max-height:500px){.cc-v3-stage{width:100px}}

/* Emphasize the mission call without adding a forced line break. */
#intro p b{color:#ff8200}

/* One service palette supplies lobby, Galaxy, summary and health bars. */
.cc-v3-resilience{background:conic-gradient(var(--service-portal) 0 33%,var(--service-payments) 33% 66%,var(--service-operations) 66%)}

/* Service identity stays consistent in the chart, legend and health bars.
   Width/percentage show remaining health; low percentages get extra emphasis. */
.service-health i,.rs-compact-service i{background:var(--service-color)!important}
.warning strong{font-weight:700}

/* Narrow desktop/tablet mission cards still fit the complete action labels. */
@media (min-width:1025px) and (pointer:fine) and (max-width:1199px),(min-width:1025px) and (pointer:none) and (max-width:1199px){#cc-v2-lobby #intro{padding-inline:14px}}
