/* cib team games — layout on top of tokens.css + components.css.
   Colour only where it means something: app icon, the one primary button,
   selected states, the key result. Everything else is neutral. */

/* ---------- landing ---------- */
.studio { max-width: var(--page); margin: 0 auto; padding: var(--space-8) var(--gutter) var(--space-12); }
.hero { max-width: 36rem; }
.hero h1 { font-size: var(--fs-3xl); line-height: var(--lh-3xl); font-weight: var(--fw-heavy); letter-spacing: -.025em; }
.hero p { margin-top: var(--space-3); font-size: var(--fs-lg); line-height: var(--lh-lg); color: var(--text-muted); }
.shelf { margin-top: var(--space-8); }
.shelf h2 { font-size: var(--fs-lg); font-weight: var(--fw-bold); margin: 0 0 var(--space-3) var(--space-1); }
.apps { display: grid; gap: var(--space-3); }
.app-card { display: flex; gap: var(--space-4); align-items: flex-start; height: 100%; padding: var(--space-4); border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); color: var(--text); text-decoration: none; box-shadow: var(--shadow-1); }
.app-card:hover { border-color: var(--border-strong); }
.app-card__body { flex: 1; min-width: 0; display: grid; gap: var(--space-1); }
.app-card__name { font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-heavy); }
.app-card__text { color: var(--text-muted); }
.app-card__meta { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-2); }
.app-card__go { display: inline-flex; align-items: center; gap: var(--space-1); margin-top: var(--space-2); color: var(--accent-text); font-weight: var(--fw-bold); }
.join-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); margin-top: var(--space-6); padding: var(--space-4) var(--space-5); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
.foot { max-width: var(--page); margin: 0 auto; padding: var(--space-6) var(--gutter) var(--space-10); border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-3); color: var(--text-muted); }
.foot b { color: var(--text); }
@media (min-width: 52rem) {
  .studio { padding-top: var(--space-12); padding-inline: var(--space-8); }
  .hero h1 { font-size: 3rem; line-height: 1.1; }
  .apps { grid-template-columns: repeat(3, 1fr); }
  .app-card { flex-direction: column; min-height: 15rem; }
  .shelf { padding: var(--space-8) var(--space-6) var(--space-6); }
}

/* ---------- host stage (laptop, shared on a video call) ---------- */
:root { --page-bar: var(--page); }
.stage { max-width: var(--page); margin: 0 auto; padding: var(--space-5) var(--gutter) var(--space-12); display: grid; gap: var(--space-5); }
@media (min-width: 52rem) { .stage { padding-inline: var(--space-8); } }
.stage-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3); }
.stage-head h1 { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-bold); }
.split { display: grid; gap: var(--space-5); }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; } }
.code-box { display: grid; gap: var(--space-4); justify-items: center; text-align: center; }
.code-box__url { color: var(--text-muted); }
.code-box__url b { color: var(--text); }
.room-code { font-size: 3.5rem; line-height: 1; font-weight: var(--fw-heavy); letter-spacing: .18em; padding-left: .18em; color: var(--accent-strong); font-variant-numeric: tabular-nums; }
.qr { width: 11rem; height: 11rem; padding: var(--space-2); background: #fff; border-radius: var(--radius-md); }
.qr svg { width: 100%; height: 100%; }
.names { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.name-tag { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 2.25rem; padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--border-strong); font-weight: var(--fw-medium); }
.name-tag .icon { width: 1rem; height: 1rem; color: var(--text-muted); }
.name-tag--off { border-style: dashed; color: var(--text-muted); }
.name-tag--done { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-strong); font-weight: var(--fw-bold); }
.name-tag--done .icon { color: currentColor; }
.big-q { font-size: var(--fs-2xl); line-height: var(--lh-2xl); font-weight: var(--fw-bold); letter-spacing: var(--tracking-tight); }
.status-line { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); color: var(--text-muted); }
.status-line .icon { width: 1.125rem; height: 1.125rem; }
.status-line > span { display: inline-flex; align-items: center; gap: var(--space-1); }
.host-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }
.notice { display: flex; gap: var(--space-3); align-items: flex-start; padding: var(--space-3) var(--space-4); border-radius: var(--radius-md); background: var(--warning-subtle); color: var(--text); }
.notice .icon { color: var(--warning); margin-top: .125rem; }
.notice--error { background: var(--danger-subtle); }
.notice--error .icon { color: var(--danger); }

/* answer options shown on the host screen */
.opts { display: grid; gap: var(--space-3); }
@media (min-width: 40rem) { .opts--4 { grid-template-columns: 1fr 1fr; } }
.opt { display: flex; align-items: center; gap: var(--space-3); min-height: 3.5rem; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--border-strong); font-size: var(--fs-lg); line-height: var(--lh-lg); font-weight: var(--fw-medium); text-align: left; }
.opt__key { display: grid; place-items: center; flex: none; width: 2rem; height: 2rem; border-radius: var(--radius-sm); background: var(--surface-2); font-weight: var(--fw-heavy); font-size: var(--fs-md); }
.opt__end { margin-left: auto; display: inline-flex; align-items: center; gap: var(--space-1); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.opt--right { background: var(--success-subtle); border: 2px solid var(--success); }
.opt--right .opt__end { color: var(--success); }
.opt--dim { opacity: .62; }

/* scoreboard */
.board { display: grid; }
.board li { display: flex; align-items: center; gap: var(--space-3); padding: var(--space-2) var(--space-1); border-top: 1px solid var(--border); }
.board li:first-child { border-top: 0; }
.board__rank { width: 2rem; text-align: right; font-weight: var(--fw-bold); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.board__name { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: var(--fw-medium); }
.board__score { font-weight: var(--fw-heavy); font-variant-numeric: tabular-nums; }
.board__top .board__name, .board__top .board__rank { color: var(--accent-strong); font-weight: var(--fw-heavy); }
.board__note { font-size: var(--fs-sm); color: var(--text-muted); }

/* the shared quote / statement card */
.quote { font-size: var(--fs-2xl); line-height: var(--lh-2xl); font-weight: var(--fw-bold); overflow-wrap: anywhere; }
.quote::before { content: "\201C"; color: var(--text-muted); }
.quote::after { content: "\201D"; color: var(--text-muted); }

/* timer */
.timer { display: grid; gap: var(--space-1); min-width: 10rem; }
.timer__text { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: var(--fw-bold); font-variant-numeric: tabular-nums; }
.timer__text .icon { width: 1.125rem; height: 1.125rem; color: var(--text-muted); }

/* ---------- Zoom In picture ---------- */
.pic { position: relative; overflow: hidden; border-radius: var(--radius-md); background: var(--surface-2); aspect-ratio: 16 / 10; }
.pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform-origin: var(--fx, 50%) var(--fy, 50%); transform: scale(var(--zoom, 1)); transition: transform 1.6s var(--ease-out); }
.pic--contain img { object-fit: contain; }
.pic__tag { position: absolute; left: var(--space-3); bottom: var(--space-3); display: inline-flex; align-items: center; gap: var(--space-1); padding: var(--space-1) var(--space-3); border-radius: var(--radius-pill); background: var(--inverse); color: var(--on-inverse); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.pic__tag .icon { width: 1rem; height: 1rem; }
.pic-missing { display: grid; place-items: center; height: 100%; padding: var(--space-6); text-align: center; color: var(--text-muted); }

/* own-pictures editor */
.my-pics { display: grid; gap: var(--space-4); }
.my-pic { display: grid; gap: var(--space-3); padding: var(--space-4); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
@media (min-width: 48rem) { .my-pic { grid-template-columns: 16rem minmax(0, 1fr); } }
.my-pic .pic { cursor: crosshair; }
.my-pic__focus { position: absolute; width: 1.5rem; height: 1.5rem; margin: -.75rem 0 0 -.75rem; border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px #000; pointer-events: none; }
.opt-grid { display: grid; gap: var(--space-2); }
@media (min-width: 40rem) { .opt-grid { grid-template-columns: 1fr 1fr; } }
.opt-edit { display: flex; align-items: center; gap: var(--space-2); }
.opt-edit input[type="radio"] { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); flex: none; }
.opt-edit .field__control { flex: 1; }
.range { width: 100%; accent-color: var(--accent); }

/* ---------- player (phone) ---------- */
.phone { max-width: 30rem; margin: 0 auto; padding: var(--space-4) var(--gutter) var(--space-10); display: grid; gap: var(--space-4); }
.phone h1 { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-bold); }
.me-bar { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); color: var(--text-muted); font-size: var(--fs-sm); }
.me-bar b { color: var(--text); }
.choices { display: grid; gap: var(--space-3); }
.choice { display: flex; align-items: center; gap: var(--space-3); width: 100%; min-height: 3.5rem; padding: var(--space-2) var(--space-4); border-radius: var(--radius-md); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); font-weight: var(--fw-medium); text-align: left; cursor: pointer; overflow-wrap: anywhere; }
.choice:hover { background: var(--surface-2); }
.choice[aria-pressed="true"] { background: var(--accent-tint); border: 2px solid var(--accent); color: var(--accent-strong); font-weight: var(--fw-bold); }
.choice[aria-pressed="true"] .opt__key { background: var(--accent); color: var(--on-accent); }
.choice__check { margin-left: auto; display: none; }
.choice[aria-pressed="true"] .choice__check { display: block; }
.choice:disabled { cursor: default; }
.choice:disabled:not([aria-pressed="true"]) { opacity: .62; }
textarea.field__input { resize: vertical; min-height: 5.5rem; padding-block: var(--space-3); }
.counter { font-size: var(--fs-sm); color: var(--text-muted); text-align: right; }
.feedback { display: grid; justify-items: center; gap: var(--space-2); padding: var(--space-6) var(--space-4); text-align: center; }
.feedback .icon { width: 2.5rem; height: 2.5rem; }
.feedback--right .icon { color: var(--success); }
.feedback--wrong .icon { color: var(--danger); }
.feedback__title { font-size: var(--fs-xl); line-height: var(--lh-xl); font-weight: var(--fw-bold); }
.lie-pick { display: flex; align-items: center; gap: var(--space-2); font-size: var(--fs-sm); font-weight: var(--fw-bold); }
.lie-pick input { width: 1.25rem; height: 1.25rem; accent-color: var(--accent); }
.statement { display: grid; gap: var(--space-2); padding: var(--space-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.statement--lie { border: 2px solid var(--accent); background: var(--accent-subtle); }
.overlay { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: var(--gutter); background: var(--scrim, rgba(20, 25, 35, .45)); }
.overlay__card { max-width: 26rem; width: 100%; padding: var(--space-6) var(--space-5); border-radius: var(--radius-lg); background: var(--surface-raised); box-shadow: var(--shadow-2); display: grid; gap: var(--space-3); text-align: center; justify-items: center; }
.overlay__card > .icon { width: 2rem; height: 2rem; color: var(--text-muted); }
@media (min-width: 56rem) { .split--pic { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.play .pic { border-radius: var(--radius-md); }
.field__help .icon { display: inline-block; vertical-align: -0.2em; width: 1rem; height: 1rem; }
.stage-head h1 .icon { display: inline-block; vertical-align: -0.15em; }
.icon.inline { display: inline-block; vertical-align: -0.2em; width: 1.1em; height: 1.1em; }
.net-status { position: sticky; top: 0; z-index: 40; display: flex; justify-content: center; align-items: center; gap: var(--space-2); padding: var(--space-2) var(--gutter); background: var(--warning-subtle); font-weight: var(--fw-bold); }
.choice > span:not(.opt__key) { flex: 1; }
/* headings get programmatic focus on screen change; no ring for that */
[tabindex="-1"]:focus:not(:focus-visible), h1[tabindex="-1"]:focus, h2[tabindex="-1"]:focus { outline: none; }
