/* Strengths HUD (play/strengths.js) and the crystal labels (world/js/crystals.js). Figma card style: black 75% panel,
   2px white border, 4px radius, IvyOra Light headings, Inter body. Sizes follow the stage (1cqw = 1% of its width). */
.sb-score, .sb-bar, .sb-speech { position: absolute; z-index: 30; background: rgba(0, 0, 0, .75); border: 2px solid #fff; border-radius: 4px; color: #fff; font-family: Inter, system-ui, sans-serif; pointer-events: none; }
.sb-score, .sb-bar { opacity: 0; transition: opacity .3s; }
body.sb-on[data-screen="planet"] .sb-score, body.sb-on[data-screen="planet"] .sb-bar { opacity: 1; }
body.sb-on[data-screen="planet"] .planet-hud { top: calc(1.5cqw + clamp(30px, 3.2cqw, 90px)); }
body.sb-on[data-screen="planet"] .captions { bottom: clamp(70px, 8.6cqw, 240px); }

/* score: top left */
.sb-score { left: 1.5cqw; top: 1.5cqw; display: flex; align-items: baseline; gap: .6em; padding: clamp(4px, .45cqw, 14px) clamp(8px, .9cqw, 26px); font-size: clamp(13px, 1.15cqw, 34px); font-weight: 600; }
.sb-score b { font-weight: 700; font-variant-numeric: tabular-nums; }
.sb-score.pop b { animation: sbPop .5s ease-out; display: inline-block; }

/* power bar: bottom centre */
.sb-bar { left: 50%; bottom: 1.2cqw; transform: translateX(-50%); padding: clamp(5px, .55cqw, 16px) clamp(8px, .8cqw, 24px) clamp(7px, .7cqw, 20px); text-align: center; }
.sb-head { margin: 0 0 clamp(4px, .45cqw, 14px); font-family: 'ivyora-display', Georgia, serif; font-weight: 300; font-size: clamp(14px, 1.45cqw, 44px); line-height: 1.15; letter-spacing: 0; white-space: nowrap; }
.sb-bar.planet .sb-head { display: none; }
body.sb-on[data-screen="planet"] .sb-bar.planet { pointer-events: auto; }   /* the overview faces are buttons: click one to go to that person */
.sb-row { display: flex; align-items: center; justify-content: center; gap: clamp(5px, .5cqw, 16px); }
.sb-slot { position: relative; display: grid; place-items: center; width: clamp(30px, 3.2cqw, 96px); height: clamp(30px, 3.2cqw, 96px); border: 2px solid rgba(255, 255, 255, .22); border-radius: 4px; background: rgba(255, 255, 255, .05); }
.sb-slot.full { border-color: var(--c); background: color-mix(in srgb, var(--c) 18%, transparent); box-shadow: 0 0 .6cqw color-mix(in srgb, var(--c) 70%, transparent), inset 0 0 .5cqw color-mix(in srgb, var(--c) 45%, transparent); }
.sb-slot svg { width: 46%; height: 82%; filter: drop-shadow(0 0 .35cqw var(--c)); }
.sb-slot.pop { animation: sbPop .5s ease-out; }
.sb-soon { margin: 0; font-size: clamp(12px, 1.05cqw, 32px); opacity: .8; }
@keyframes sbPop { 0% { transform: scale(1.5); filter: brightness(2.2); } 100% { transform: scale(1); filter: none; } }

/* planet mode: the planet's people as face badges, a tick when done */
.sb-ava { position: relative; flex: none; display: grid; place-items: center; background: #2b2f3a center / cover no-repeat; image-rendering: pixelated; width: clamp(28px, 2.9cqw, 88px); height: clamp(28px, 2.9cqw, 88px); border-radius: 50%; border: 2px solid rgba(255, 255, 255, .7); }
.sb-ava.crop { background-size: 240% auto; background-position: 50% 10%; }
.sb-ava i { font-style: normal; font-weight: 700; font-size: 1.1em; }
.sb-bar .sb-ava.done { border-color: #00bd8c; box-shadow: 0 0 .5cqw rgba(0, 189, 140, .7); }
.sb-tick { position: absolute; right: -12%; bottom: -12%; display: grid; place-items: center; width: 46%; height: 46%; border-radius: 50%; background: #00bd8c; border: 2px solid #fff; color: #fff; font: 700 clamp(9px, .8cqw, 24px) / 1 Inter, sans-serif; font-style: normal; }
.sb-count { margin-left: clamp(4px, .5cqw, 14px); font-size: clamp(12px, 1.05cqw, 32px); font-weight: 600; white-space: nowrap; }

/* speech box: bottom left, face badge + strength name + one line; never blocks play */
.sb-speech { left: 1.2cqw; bottom: 1.2cqw; display: flex; align-items: center; gap: clamp(6px, .8cqw, 24px); max-width: 26cqw; padding: clamp(6px, .6cqw, 18px) clamp(10px, 1.1cqw, 32px) clamp(6px, .6cqw, 18px) clamp(6px, .6cqw, 18px); opacity: 0; transform: translateY(.6cqw); transition: opacity .25s, transform .25s; }
.sb-speech.on { opacity: 1; transform: none; }
.sb-face .sb-ava { width: clamp(40px, 4.4cqw, 130px); height: clamp(40px, 4.4cqw, 130px); border-color: #00bd8c; border-width: 3px; }
.sb-words h3 { margin: 0 0 .1em; font-family: 'ivyora-display', Georgia, serif; font-weight: 300; font-size: clamp(14px, 1.4cqw, 42px); line-height: 1.15; }
.sb-words p { margin: 0; font-size: clamp(12px, 1.05cqw, 32px); line-height: 1.35; }
body.in-dialog .sb-speech { opacity: 0; }
body.sb-speaking .w3d-keys { opacity: 0; transition: opacity .25s; }

/* the streak of light from a crystal to its slot */
.sb-streak { position: fixed; z-index: 100; left: 0; top: 0; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none; background: radial-gradient(circle, #fff 0 18%, var(--c) 42%, transparent 70%); scale: var(--s); opacity: calc(var(--s) * .95); }
.sb-streak.head { width: 30px; height: 30px; margin: -15px 0 0 -15px; box-shadow: 0 0 18px 6px var(--c); }

/* crystal labels: white Inter on a small black rounded tag, placed by world/js/crystals.js */
.cr-tags { position: absolute; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.cr-tag { position: absolute; left: 0; top: 0; padding: .32em .55em .26em; border: 2px solid #fff; border-radius: 4px; background: rgba(0, 0, 0, .75); color: #fff; font: 400 clamp(11px, .9cqw, 26px) / 1 var(--font-pixel, monospace); font-variant-ligatures: none; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; will-change: transform; transition: opacity .25s; }   /* same look as the object labels (world3d.css .w3d-olbl) */
@media (orientation: landscape) and (max-height: 500px) { body.touch-ui .cr-tag { font-size: 9px; padding: 3px 4px 2px; border-width: 1.5px; border-radius: 3px; } }
.cr-tag.gone { opacity: 0; }
body.w3d-intro .cr-tags { opacity: 0; }

/* v3 talk demo (2 Dec): only for the people in WOW.TALK_DEMO (Renz). body.talk-demo is on while you are with them.
   The conversation box is one fixed size anchored to the bottom middle; the strengths bar is small, top left, and
   only shows once the hello is over. Everyone else keeps the original layout above. */
body.talk-demo .sb-speech { top: auto; bottom: 1.6cqw; left: 50%; width: min(94vw, max(46cqw, 540px)); min-width: 0; max-width: none;
  height: clamp(136px, 10.8cqw, 330px); box-sizing: border-box; align-items: flex-start; background: rgba(8, 8, 10, .94);
  padding: clamp(10px, 1cqw, 30px) clamp(14px, 1.5cqw, 44px); transform: translate(-50%, .6cqw); }
body.talk-demo .sb-speech.on { transform: translate(-50%, 0); }
body.talk-demo .sb-face .sb-ava { width: clamp(48px, 5.4cqw, 160px); height: clamp(48px, 5.4cqw, 160px); }
body.talk-demo .sb-words { flex: 1; min-width: 0; }
body.talk-demo .sb-words h3 { margin: 0 0 .5em; line-height: 1.05; font-size: clamp(18px, 2cqw, 60px); }
body.talk-demo .sb-words p { font-size: clamp(12px, 1.05cqw, 30px); }
.sb-role { display: none; }
body.talk-demo .sb-role:not([hidden]) { display: block; margin: -.35em 0 .4em; color: #fcb24f; font: 400 clamp(12px, 1cqw, 30px) / 1.1 var(--font-pixel); letter-spacing: .05em; text-transform: uppercase; }
/* strengths in the box: the bar's crystal icons, name underneath */
.sb-chips { display: flex; gap: clamp(8px, 1.1cqw, 32px); padding-top: .15em; }
.sb-st { display: grid; justify-items: center; gap: .25em; animation: sbChip .45s ease-out; }
.sb-st .sb-slot { width: clamp(26px, 2.6cqw, 78px); height: clamp(26px, 2.6cqw, 78px); }
.sb-st small { font-size: clamp(10px, .78cqw, 24px); color: color-mix(in srgb, var(--c) 55%, #fff); white-space: nowrap; }
@keyframes sbChip { from { opacity: 0; transform: translateY(.6em) scale(.7); } }
/* the bar is drawn at 72%, so its heading is set larger to land at the same size as the other pixel labels */
body.talk-demo .sb-bar { left: 1.5cqw; top: 9.6cqw; bottom: auto; transform: scale(.72); transform-origin: 0 0; text-align: left; }
body.talk-demo .sb-bar .sb-head { font: 400 clamp(16.7px, 1.39cqw, 41.7px) / 1.1 var(--font-pixel); letter-spacing: .05em; text-transform: uppercase; }
body.talk-demo.sb-hello .sb-bar { opacity: 0 !important; }
/* demo: the box waits for you; ▶▶ blinks once the line is typed (like the original game). Click it, or Space / Enter / E */
body.talk-demo .sb-speech.on { pointer-events: auto; cursor: pointer; }
.sb-more { display: none; }
body.talk-demo .sb-more:not([hidden]) { display: block; position: absolute; right: 1.2cqw; bottom: .8cqw; color: #fcb24f; font: 400 clamp(12px, 1cqw, 30px) / 1 var(--font-pixel); animation: sbBlink .5s infinite steps(2); }
@keyframes sbBlink { 50% { opacity: 0; } }

/* quick travel (2 Dec): the planet's people at the bottom centre while you are with someone and nobody is talking;
   click a face to go to them. Ticked = done, outlined = the person you are with. */
.sb-people { position: absolute; z-index: 30; left: 50%; bottom: 1.2cqw; transform: translateX(-50%); display: flex; align-items: center; gap: clamp(4px, .5cqw, 14px);
  padding: clamp(5px, .55cqw, 16px) clamp(8px, .8cqw, 24px); background: rgba(0, 0, 0, .75); border: 2px solid #fff; border-radius: 4px; color: #fff;
  font-family: Inter, system-ui, sans-serif; opacity: 0; pointer-events: none; transition: opacity .3s; }
body.sb-on[data-screen="planet"]:not(.sb-speaking) .sb-people:not([hidden]) { opacity: 1; pointer-events: auto; }
.sb-people[hidden] { display: none; }
.sb-go { all: unset; cursor: pointer; display: block; border-radius: 50%; transition: transform .15s; }
.sb-go:hover, .sb-go:focus-visible { transform: translateY(-3px) scale(1.08); }
.sb-go:focus-visible { outline: 2px solid #ffd633; outline-offset: 3px; }
.sb-go.here { cursor: default; transform: none; }
.sb-go.here .sb-ava { border-color: #ffd633; box-shadow: 0 0 .6cqw rgba(255, 214, 51, .8); }
.sb-people .sb-ava.done { border-color: #00bd8c; }
/* 3 Dec: the people-met counter matches the Sound button opposite (pixel caps, same size, padding and corners) */
.sb-score { align-items: center; gap: .5em; padding: .7cqw 1.2cqw; border-radius: .5cqw; background: rgba(0, 0, 0, .78); font: 400 clamp(12px, 1cqw, 30px) / 1.1 var(--font-pixel); letter-spacing: .05em; text-transform: uppercase; }
.sb-score b { font-weight: 400; }
@media (orientation: landscape) and (max-height: 500px) { .sb-score { height: 34px; box-sizing: border-box; padding: 0 10px; border-radius: 4px; } }
/* the "Branding: 2 of 3 people" count in the same pixel caps as the counter, Sound button, Next and the key hints beside it */
.sb-count { font: 400 clamp(12px, 1cqw, 30px) / 1.1 var(--font-pixel); letter-spacing: .05em; text-transform: uppercase; }
