/* 3D scenes ("who goes first?"). Loaded after games.css, uses the same color variables. */

/* featured card on the games list */
.gm-feat { border-color: var(--gm-purple); background: linear-gradient(135deg, var(--gm-purple-soft), var(--surface) 70%); }
.gm-gico-scenes { background: var(--gm-purple); color: #fff; }

/* ---- scenes list ---- */
.sc-progress { font-weight: 700; color: var(--primary); margin: 4px 0 0; }
.sc-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0 16px; }
.sc-card { display: flex; align-items: center; gap: 12px; min-height: 64px; text-decoration: none; color: var(--text); transition: transform .1s, border-color .15s; }
.sc-card:hover { border-color: var(--primary); }
.sc-card:active { transform: scale(.985); }
.sc-card.solved { border-color: var(--good); }
.sc-num { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: var(--primary-soft); color: var(--primary); }
.sc-ttl { flex: 1; min-width: 0; font-weight: 700; overflow-wrap: anywhere; }
.sc-ok { flex: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 10px; border-radius: 99px; background: var(--good-soft); color: var(--good); font-size: .8rem; font-weight: 700; }
.sc-check { display: inline-flex; }

/* ---- detail page ---- */
.sc-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.sc-top .back { padding: 8px 0; }
.sc-n { font-size: .85rem; color: var(--muted); font-weight: 700; }
.sc h1 { margin: 2px 0 10px; font-size: 1.3rem; }

.sc-stage {
  position: relative; width: 100%; height: clamp(300px, 56vh, 540px);
  border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line);
  background: #cddde7; touch-action: none; user-select: none; -webkit-user-select: none;
}
.sc-canvas { display: block; width: 100%; height: 100%; cursor: grab; }
.sc-canvas:active { cursor: grabbing; }
.sc-labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.sc-lab {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -100%);
  padding: 2px 8px; border-radius: 99px; font-size: .82rem; font-weight: 800; line-height: 1.3;
  background: rgba(255, 255, 255, .94); color: #16232c; border: 2px solid #16232c; white-space: nowrap;
  will-change: left, top;
}
.sc-lab.me { background: #ffd23f; border-color: #16232c; font-size: .95rem; }
.sc-lab.ped { background: #fff; border-color: #c46a00; color: #8a4a00; }
.sc-camreset {
  position: absolute; right: 8px; top: 8px; min-height: 40px; padding: 6px 12px; border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, .25); background: rgba(255, 255, 255, .92); color: #16232c;
  font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer;
}
.sc-camreset:hover { background: #fff; }
.sc-hint { margin: 6px 2px 0; font-size: .8rem; text-align: center; }
.sc-msg { position: absolute; inset: 0; display: grid; place-items: center; padding: 20px; text-align: center; color: #16232c; font-weight: 600; }

.sc-panel { margin-top: 12px; }
.sc-q { font-size: 1.15rem; font-weight: 800; margin: 4px 0 10px; }
.sc-answers { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.sc-ans {
  display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 60px; padding: 8px 12px;
  border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); color: var(--text);
  font: inherit; font-size: 1.05rem; font-weight: 800; cursor: pointer;
}
.sc-ans:hover { border-color: var(--primary); }
.sc-ans:active { transform: scale(.97); }
.sc-ans:disabled { opacity: .4; cursor: default; transform: none; }
.sc-sw { flex: none; width: 24px; height: 24px; border-radius: 7px; border: 2px solid rgba(0, 0, 0, .35); display: inline-block; }
.sc-sw.ped { border-radius: 50%; background: #f2a33a; }

.sc-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0 4px; min-height: 40px; }
.sc-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 6px; border-radius: 99px; background: var(--primary-soft); color: var(--text); font-weight: 800; }
.sc-chip b { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-size: .8rem; }
.sc-chip .sc-sw { width: 16px; height: 16px; border-radius: 5px; }
.sc-chip .sc-sw.ped { border-radius: 50%; }
.sc-then { color: var(--muted); font-weight: 700; }
.sc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.sc-actions .btn { flex: 1 1 140px; }

.sc-res { padding: 12px 14px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--surface); }
.sc-res.ok { border-color: var(--good); background: var(--good-soft); }
.sc-res.bad { border-color: var(--bad); background: var(--bad-soft); }
.sc-res-title { font-size: 1.2rem; font-weight: 800; margin: 0 0 6px; }
.sc-order { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.sc-order-h { font-weight: 700; margin-right: 4px; }
.sc-explain { margin: 8px 0; line-height: 1.5; }
.sc-ref { margin: 8px 0 0; }

@media (prefers-reduced-motion: reduce) {
  .sc-card, .sc-ans { transition: none; }
}
