/* ============================================================
   phone.css — realistic device frame + game screens
   All inner sizing is in `em`, relative to a base of 16px × --u
   (--u = width/300), so the whole UI scales with the phone width
   and never compacts/overlaps at smaller sizes.
   ============================================================ */

.phone { position: relative; flex: none; font-size: calc(16px * var(--u, 1)); }

.phone__glow {
  position: absolute; inset: -16% -20% -10% -20%; z-index: 0; pointer-events: none;
  background: radial-gradient(60% 50% at 50% 40%, var(--accent-tint), transparent 70%);
  filter: blur(20px);
}

.phone__rim {
  position: relative; z-index: 1; width: 100%; height: 100%;
  border-radius: 13.5% / 6.6%;
  padding: 0.7em;
  background:
    linear-gradient(150deg, oklch(0.5 0.02 20), oklch(0.22 0.01 20) 30%, oklch(0.12 0.005 20) 65%, oklch(0.34 0.015 20));
  box-shadow:
    0 1px 1px oklch(1 0 0 / 0.4) inset,
    0 0 0 1px oklch(0 0 0 / 0.6),
    0 50px 90px -40px oklch(0 0 0 / 0.9),
    0 20px 50px -30px oklch(0 0 0 / 0.8);
}

.phone__screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 10.5% / 5.6%;
  background: var(--bg-deep);
  overflow: hidden;
  box-shadow: 0 0 0 1px oklch(0 0 0 / 0.8) inset;
}

.phone__island {
  position: absolute; top: 0.56em; left: 50%; transform: translateX(-50%);
  width: 34%; height: 1.6em; background: #000; border-radius: 999px; z-index: 6;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 0.56em;
}
.phone__cam { width: 0.5em; height: 0.5em; border-radius: 50%; background: oklch(0.28 0.03 250); box-shadow: 0 0 0 1.5px oklch(0 0 0 / 0.8); }

.phone__statusbar {
  position: relative; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8em 1.4em 0; font-size: 0.75em; font-weight: 600; color: var(--ink);
  font-family: var(--sans);
}
.phone__status-icons { display: flex; align-items: center; gap: 0.33em; }
.phone__status-icons i { display: block; }
.sb-net  { width: 1em; height: 0.65em; background: currentColor; clip-path: polygon(0 70%,18% 70%,18% 100%,0 100%, 27% 45%,45% 45%,45% 100%,27% 100%, 54% 22%,72% 22%,72% 100%,54% 100%, 81% 0,100% 0,100% 100%,81% 100%); }
.sb-wifi { width: 0.95em; height: 0.7em; background: currentColor; clip-path: path('M7.5 11 L0 3.5 A10.6 10.6 0 0 1 15 3.5 Z'); }
.sb-batt { width: 1.4em; height: 0.7em; border: 0.09em solid currentColor; border-radius: 0.2em; position: relative; }
.sb-batt::before { content:""; position:absolute; inset:1.5px; right:40%; background: currentColor; border-radius: 1px; }
.sb-batt::after { content:""; position:absolute; right:-0.18em; top:0.2em; width:0.12em; height:0.32em; background: currentColor; border-radius: 0 2px 2px 0; }

.phone__content { position: absolute; inset: 2.6em 0 0; display: flex; flex-direction: column; }

/* ---------------- Game screens ---------------- */
.gs {
  flex: 1; display: flex; flex-direction: column; min-height: 0;
  padding: 0.9em 1em 1.2em; gap: 0.7em; font-family: var(--sans);
  color: var(--ink);
}
.gs--challenge { background: radial-gradient(120% 80% at 50% 0%, oklch(0.26 0.07 18), var(--bg-deep) 70%); }
.gs--truth     { background: radial-gradient(120% 80% at 50% 0%, oklch(0.24 0.045 60), var(--bg-deep) 70%); }

.gs__topbar { display: flex; align-items: center; justify-content: space-between; gap: 0.5em; }
.gs__safe { font-size: 0.62em; color: var(--ink-mute); font-family: var(--mono); letter-spacing: 0.02em; line-height: 1.25; }
.gs__safe b { color: var(--accent-bright); font-weight: 600; }

.heatbar { display: inline-flex; gap: 0.2em; flex: none; }
.heatbar__seg { width: 1em; height: 0.32em; border-radius: 0.2em; background: oklch(1 0 0 / 0.12); }
.heatbar__seg.on[data-i="1"] { background: var(--heat-0); }
.heatbar__seg.on[data-i="2"] { background: var(--heat-1); }
.heatbar__seg.on[data-i="3"] { background: var(--heat-3); }

.gs__player { display: flex; align-items: center; gap: 0.625em; }
.gs__avatar {
  width: 2.375em; height: 2.375em; border-radius: 50%; flex: none; display: grid; place-items: center;
  color: oklch(0.16 0.02 10);
  background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep));
}
.gs__avatar--b { background: linear-gradient(135deg, var(--heat-0), oklch(0.62 0.12 60)); }
.gs__avatar .avfig { width: 60%; height: 60%; fill: oklch(0.16 0.02 10 / 0.6); display: block; }
.gs__pinfo { flex: 1; min-width: 0; }
.gs__role { font-size: 0.62em; color: var(--ink-faint); text-transform: uppercase; letter-spacing: 0.14em; font-family: var(--mono); margin-bottom: 0.15em; line-height: 1.1; }
.gs__name { font-weight: 700; font-size: 1em; letter-spacing: 0.02em; line-height: 1.1; }
.gs__target { font-weight: 600; font-size: 0.8em; color: var(--accent-bright); letter-spacing: 0; }
.gs__tag { flex: none; font-size: 0.7em; font-weight: 600; padding: 0.3em 0.7em; border-radius: 999px; background: oklch(0.66 0.21 14 / 0.2); color: var(--accent-bright); border: 1px solid oklch(0.66 0.21 14 / 0.3); white-space: nowrap; }
.gs__tag--soft { background: oklch(0.8 0.13 78 / 0.16); color: var(--heat-0); border-color: oklch(0.8 0.13 78 / 0.3); }
.gs__tag--ember { background: oklch(0.58 0.22 24 / 0.22); color: oklch(0.80 0.16 32); border-color: oklch(0.58 0.22 24 / 0.42); }

/* Extra-Spicy ember variant */
.gs--ember { background: radial-gradient(120% 80% at 50% 0%, oklch(0.30 0.11 22), var(--bg-deep) 72%); }
.gs--ember .gs__avatar { background: linear-gradient(135deg, var(--heat-1), var(--heat-3)); }
.gs--ember .gs__ring-fg { stroke: oklch(0.66 0.21 24); }
.gs--ember .gs__target { color: oklch(0.80 0.16 32); }
.gs--ember .gs__mult.on { background: oklch(0.58 0.22 24 / 0.18); border-color: oklch(0.66 0.21 24); color: oklch(0.82 0.16 34); }

.gs__card {
  flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 0.7em; text-align: center;
  background: oklch(1 0 0 / 0.04); border: 1px solid var(--line);
  border-radius: 1.3em; padding: 1.05em 0.9em; backdrop-filter: blur(8px);
}
.gs__type { font-size: 0.72em; font-weight: 600; color: var(--ink-soft); padding: 0.3em 0.75em; border-radius: 999px; background: oklch(1 0 0 / 0.06); }
.gs__prompt { font-family: var(--serif); font-style: italic; font-size: 1.05em; line-height: 1.3; color: var(--ink); text-wrap: balance; }
.gs__prompt--lg { font-size: 1em; }

.gs__timer { position: relative; width: 5.4em; height: 5.4em; margin: 0.1em 0; flex: none; }
.gs__ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.gs__ring-bg { fill: none; stroke: oklch(1 0 0 / 0.1); stroke-width: 7; }
.gs__ring-fg { fill: none; stroke: var(--accent-bright); stroke-width: 7; stroke-linecap: round; stroke-dasharray: 327; transition: stroke-dashoffset .9s linear; }
.gs__count { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--mono); font-size: 1.75em; font-weight: 600; color: var(--ink); }

.gs__mults { display: flex; gap: 0.35em; flex-wrap: wrap; justify-content: center; }
.gs__mult { font-family: var(--mono); font-size: 0.72em; padding: 0.35em 0.65em; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--ink-mute); transition: .2s; }
.gs__mult.on { background: var(--accent-tint); border-color: var(--accent); color: var(--accent-bright); }

.gs__actions { display: flex; gap: 0.55em; }
.gs__btn { flex: 1; padding: 0.85em; border-radius: 0.9em; border: 1px solid var(--line); font-weight: 600; font-size: 0.9em; transition: .2s; }
.gs__btn--skip { background: oklch(1 0 0 / 0.05); color: var(--ink-soft); }
.gs__btn--skip:hover { background: oklch(1 0 0 / 0.09); }
.gs__btn--ok { background: linear-gradient(135deg, var(--accent-bright), var(--accent-deep)); color: oklch(0.16 0.02 10); border-color: transparent; }
.gs__btn--soft { background: oklch(0.8 0.13 78 / 0.18); color: var(--heat-0); border-color: oklch(0.8 0.13 78 / 0.3); width: 100%; }

/* Safe-word screen */
.gs--safe { background: radial-gradient(110% 80% at 50% 30%, oklch(0.24 0.05 80), var(--bg-deep) 75%); align-items: center; justify-content: center; text-align: center; gap: 1em; }
.gs__safe-icon { font-size: 3.2em; filter: drop-shadow(0 8px 24px oklch(0.8 0.13 78 / 0.5)); }
.gs__safe-title { font-family: var(--serif); font-style: italic; font-size: 1.75em; }
.gs__safe-body { color: var(--ink-soft); font-size: 0.94em; line-height: 1.55; }
.gs__safe-foot { font-family: var(--mono); font-size: 0.66em; letter-spacing: 0.06em; color: var(--ink-faint); margin-top: 0.25em; }

/* Modes home screen */
.gs--modes { background: radial-gradient(120% 70% at 50% 0%, oklch(0.22 0.04 12), var(--bg-deep) 70%); gap: 0.6em; }
.gs__home-h { padding: 0.12em 0.12em 0.25em; }
.gs__home-eyebrow { font-family: var(--mono); font-size: 0.62em; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent-bright); }
.gs__home-title { font-family: var(--serif); font-style: italic; font-size: 1.5em; margin-top: 0.25em; }
.gs__modelist { display: flex; flex-direction: column; gap: 0.5em; flex: 1; }
.gs__moderow { display: flex; align-items: center; gap: 0.7em; padding: 0.7em 0.8em; border-radius: 0.9em; background: oklch(1 0 0 / 0.035); border: 1px solid var(--line); transition: .2s; }
.gs__moderow.on { background: var(--accent-tint); border-color: var(--accent); }
.gs__mode-e { font-size: 1.05em; width: 1.6em; text-align: center; flex: none; }
.gs__mode-txt { flex: 1; }
.gs__mode-n { font-weight: 600; font-size: 0.88em; line-height: 1.15; }
.gs__mode-d { font-size: 0.68em; color: var(--ink-faint); }
.gs__mode-dot { width: 1em; height: 1em; border-radius: 50%; border: 1.5px solid var(--line); flex: none; }
.gs__moderow.on .gs__mode-dot { border-color: var(--accent); background: radial-gradient(circle, var(--accent-bright) 40%, transparent 45%); }
.gs__home-cta { margin-top: 0.25em; }
