/* ============================================================
   TEAM ORBIT — prototype styles
   Flat, modern, cosmic-indigo. No heavy glows.
   ============================================================ */

:root {
  --bg: #0a0b1e;
  --bg-deep: #07081a;
  --ink: #eef0ff;
  --ink-dim: #9a9dc8;
  --ink-faint: #5e618f;
  --line: rgba(255, 255, 255, 0.08);
  --glass: rgba(20, 22, 52, 0.62);
  --glass-line: rgba(255, 255, 255, 0.1);
  --accent: #8c9bff;
  --font: "Geist", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: var(--font);
  color: var(--ink);
  background:
    radial-gradient(900px 600px at 18% -5%, #18204e 0%, transparent 55%),
    radial-gradient(800px 700px at 92% 8%, #2a1840 0%, transparent 50%),
    var(--bg-deep);
  -webkit-font-smoothing: antialiased;
}

/* ---- stage chrome ----------------------------------------- */

.stage-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 26px;
  border-bottom: 1px solid var(--line);
}
.stage-nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.stage-nav__mark {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e8b04b, #b06bd6 70%);
}
.stage-nav__meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}

.stage {
  display: grid;
  grid-template-columns: minmax(280px, 460px) 1fr;
  gap: 40px;
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
  padding: 48px 32px 64px;
}

.stage__hint {
  max-width: 460px;
}
.stage__hint-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
}
.stage__hint h2 {
  font-size: 34px;
  line-height: 1.12;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 12px 0 18px;
}
.stage__hint p {
  color: var(--ink-dim);
  line-height: 1.6;
  font-size: 15px;
  margin-bottom: 16px;
}
.stage__hint em {
  color: var(--ink);
  font-style: normal;
  font-weight: 500;
}
.stage__note {
  font-size: 13.5px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.02);
}
.stage__index {
  list-style: none;
  margin: 22px 0;
  border-top: 1px solid var(--line);
}
.stage__index li {
  display: flex;
  gap: 12px;
  padding: 11px 2px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--ink-dim);
}
.stage__index em {
  font-family: var(--mono);
  font-style: normal;
  color: var(--ink-faint);
  font-size: 12px;
  padding-top: 2px;
}
.stage__seed {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.stage__seed button {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 14px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.stage__seed button:hover {
  color: var(--ink);
  border-color: var(--accent);
}
.stage__seed-primary {
  color: var(--ink) !important;
  border-color: rgba(140, 155, 255, 0.55) !important;
  background: rgba(140, 155, 255, 0.12) !important;
}
.stage__seed-primary:hover {
  background: rgba(140, 155, 255, 0.22) !important;
}

/* god-view day-of-week scrubber — plays the cadence model */
.stage__day {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.stage__day-label {
  display: block;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-faint);
  margin-bottom: 10px;
}
.stage__dow {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.stage__dowbtn {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 7px 9px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s, border-color 0.15s;
}
.stage__dowbtn:hover {
  color: var(--ink);
  border-color: var(--glass-line);
}
.stage__dowbtn.is-active {
  color: #0a0b1e;
  background: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}
.stage__day-note {
  margin-top: 11px;
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-faint);
  max-width: 34ch;
}

/* ---- phone ------------------------------------------------- */

.phone {
  justify-self: center;
}
.phone__bezel {
  width: 390px;
  height: 800px;
  max-height: 86vh;
  border-radius: 52px;
  padding: 12px;
  background: linear-gradient(160deg, #2b2d4a, #111228);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, 0.8),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.phone__screen {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 42px;
  overflow: hidden;
  background:
    radial-gradient(620px 460px at 30% 6%, #1a1f52 0%, transparent 58%),
    radial-gradient(520px 520px at 88% 70%, #311a4a 0%, transparent 55%),
    var(--bg);
  display: flex;
  flex-direction: column;
}

/* ---- starfield -------------------------------------------- */

.starfield {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  animation: fielddrift 90s ease-in-out infinite alternate;
}
.star {
  position: absolute;
  border-radius: 50%;
  background: #d2d7ff;
  opacity: var(--o);
  box-shadow: 0 0 3px rgba(180, 192, 255, 0.55);
  animation: twinkle var(--tw) ease-in-out var(--dl) infinite alternate,
    starbob var(--bob) ease-in-out var(--dl) infinite alternate;
}
@keyframes twinkle {
  from { opacity: calc(var(--o) * 0.22); }
  to { opacity: var(--o); }
}
@keyframes starbob {
  from { transform: translateY(0); }
  to { transform: translateY(-7px); }
}
@keyframes fielddrift {
  from { transform: translate(0, 0); }
  to { transform: translate(-14px, 9px); }
}

.status {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 26px 4px;
  color: var(--ink-dim);
  flex: 0 0 auto;
}
.status__time {
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 500;
}
.status__icons {
  display: flex;
  gap: 6px;
  align-items: center;
  fill: var(--ink-dim);
  color: var(--ink-dim);
}

.app {
  position: relative;
  z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

/* ---- topbar ------------------------------------------------ */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 22px 4px;
  flex: 0 0 auto;
}
.topbar__family {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.topbar__space {
  /* squared "mission control" readout — taps open the weekly balance */
  font-family: "Orbitron", var(--mono);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 13px;
  text-transform: uppercase;
  cursor: pointer;
  border-bottom: 1px dashed rgba(160, 178, 255, 0.3);
  padding-bottom: 1px;
}
.topbar__space:active {
  opacity: 0.7;
}
.topbar__code {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
  letter-spacing: 0.04em;
}
.topbar__code.is-tappable {
  color: var(--ink-dim, rgba(220, 226, 255, 0.62));
  cursor: pointer;
  border-bottom: 1px dashed rgba(160, 178, 255, 0.3);
  padding-bottom: 1px;
}
.topbar__code.is-tappable:active {
  opacity: 0.7;
}
.actingas__chip,
.testmenu__chip {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: #0a0b1e;
  background: var(--c, #888);
  flex: 0 0 auto;
}

/* ---- testing menu (viewer switch + new mission + reset) ---- */
.testmenu {
  position: relative;
}
.testmenu__btn {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-line);
  border-radius: 100px;
  padding: 4px 10px 4px 5px;
  cursor: pointer;
  color: var(--ink-dim);
}
.testmenu.is-open .testmenu__btn {
  border-color: var(--accent);
  background: rgba(140, 155, 255, 0.12);
}
.testmenu__dots {
  font-size: 16px;
  line-height: 1;
  letter-spacing: 0.04em;
  margin-bottom: 4px;
}
.testmenu__panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 40;
  min-width: 208px;
  padding: 8px;
  background: rgba(18, 20, 42, 0.96);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border: 1px solid var(--glass-line);
  border-radius: 16px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}
.testmenu__group {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
  padding: 6px 8px 4px;
}
.testmenu__crew {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.testmenu__crewbtn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.testmenu__crewbtn:hover {
  background: rgba(255, 255, 255, 0.05);
}
.testmenu__crewbtn.is-on {
  background: rgba(140, 155, 255, 0.14);
}
.testmenu__crewname {
  flex: 1 1 auto;
}
.testmenu__crewbtn.is-on .testmenu__crewname::after {
  content: "✦";
  margin-left: 6px;
  color: var(--accent);
  font-size: 11px;
}
.testmenu__sep {
  height: 1px;
  background: var(--line);
  margin: 8px 4px;
}
.testmenu__item {
  display: block;
  width: 100%;
  padding: 8px;
  border-radius: 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  text-align: left;
}
.testmenu__item:hover {
  background: rgba(255, 255, 255, 0.05);
}
.testmenu__item--toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.testmenu__toggle {
  font-size: 16px;
  line-height: 1;
  color: var(--ink-faint);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 9px;
  min-width: 30px;
  text-align: center;
}
.testmenu__item--toggle.is-on {
  color: var(--ink);
}
.testmenu__item--toggle.is-on .testmenu__toggle {
  color: #0a0b1e;
  background: var(--accent);
  border-color: transparent;
}

/* ---- constellation ---------------------------------------- */

.constellation {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
}
.constellation__lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
/* the faint web connecting every family member */
.constellation__lines .cline {
  stroke: rgba(150, 165, 255, 0.09);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
  transition: stroke 0.5s ease, stroke-width 0.5s ease;
}
/* links touching the focused person — brighter, gently breathing */
.constellation__lines .cline.is-focal {
  stroke: rgba(160, 178, 255, 0.26);
  stroke-width: 1.4;
  animation: linebreath 3.4s ease-in-out infinite;
}
@keyframes linebreath {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}
/* a transient bolt along a link when recognition travels between two people */
.constellation__lines .cline--pulse {
  stroke: rgba(200, 212, 255, 0.95);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 3px rgba(160, 178, 255, 0.85));
  animation: linebolt 0.95s ease-out forwards;
  pointer-events: none;
}
@keyframes linebolt {
  0% {
    opacity: 0;
    stroke-width: 3.2;
  }
  22% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    stroke-width: 0.8;
  }
}
@media (prefers-reduced-motion: reduce) {
  .constellation__lines .cline.is-focal {
    animation: none;
  }
}

/* ambient activity whisper — one quiet rotating line low in the field */
.whisper {
  position: absolute;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%) translateY(5px);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 90%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.6s ease, transform 0.6s ease;
  z-index: 2;
}
.whisper.is-show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.whisper__text {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (prefers-reduced-motion: reduce) {
  .whisper {
    transition: none;
  }
}

.node {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--ink);
}
.node__float {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  animation: orbit var(--orb-dur, 18s) linear var(--orb-delay, 0s) infinite;
  will-change: transform;
}
/* slow continuous elliptical drift — each orb circles its own little path */
@keyframes orbit {
  0%,
  100% { transform: translate(var(--rx, 9px), 0); }
  12.5% { transform: translate(calc(var(--rx, 9px) * 0.707), calc(var(--ry, 7px) * 0.707)); }
  25% { transform: translate(0, var(--ry, 7px)); }
  37.5% { transform: translate(calc(var(--rx, 9px) * -0.707), calc(var(--ry, 7px) * 0.707)); }
  50% { transform: translate(calc(var(--rx, 9px) * -1), 0); }
  62.5% { transform: translate(calc(var(--rx, 9px) * -0.707), calc(var(--ry, 7px) * -0.707)); }
  75% { transform: translate(0, calc(var(--ry, 7px) * -1)); }
  87.5% { transform: translate(calc(var(--rx, 9px) * 0.707), calc(var(--ry, 7px) * -0.707)); }
}
.avatar {
  transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.3, 1);
}
.node:active .avatar {
  transform: scale(0.94);
}
@media (prefers-reduced-motion: reduce) {
  .node__float {
    animation: none;
  }
}
.node__name {
  font-size: 12.5px;
  font-weight: 500;
}
.node__role {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--ink-faint);
  letter-spacing: 0.02em;
}
.node__you {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.12em;
  color: #0a0b1e;
  background: var(--accent);
  border-radius: 100px;
  padding: 1px 6px;
  margin-top: 1px;
}
.node.is-focus {
  z-index: 3;
}

/* ---- avatar ------------------------------------------------ */

.avatar {
  position: relative;
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  /* grow/shrink smoothly when focus moves between members */
  transition: width 0.45s cubic-bezier(0.22, 1, 0.36, 1),
    height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
/* in the constellation, the focused member's avatar grows to lg size and the
   previously-focused one shrinks back — both animated by the transition above. */
.node .avatar {
  width: 66px;
  height: 66px;
}
.node.is-focus .avatar {
  width: 92px;
  height: 92px;
}
.avatar--lg {
  width: 92px;
  height: 92px;
}
.avatar--md {
  width: 66px;
  height: 66px;
}
.avatar--sm {
  width: 44px;
  height: 44px;
}
.avatar__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(0);
}
.avatar__ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.1);
  stroke-width: 2.4;
}
.avatar__ring-fg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.4);
  stroke-width: 2.4;
  stroke-linecap: round;
  transition: stroke-dasharray 0.5s ease;
}
.avatar__disc {
  position: relative;
  width: 74%;
  height: 74%;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 600;
  font-size: 1.05em;
  color: #0a0b1e;
  /* lit sphere: bright top-left, body colour, terminator toward bottom-right */
  background: radial-gradient(
    circle at 32% 26%,
    color-mix(in srgb, var(--c) 50%, white) 0%,
    var(--c) 44%,
    color-mix(in srgb, var(--c) 72%, black) 100%
  );
  box-shadow:
    inset 0 -5px 9px color-mix(in srgb, var(--c) 55%, black),
    inset 4px 4px 7px color-mix(in srgb, var(--c) 35%, white),
    0 7px 18px -7px rgba(0, 0, 0, 0.6);
  /* fade the focus halo in/out as selection moves */
  transition: box-shadow 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
/* specular glint */
.avatar__disc::after {
  content: "";
  position: absolute;
  top: 11%;
  left: 22%;
  width: 32%;
  height: 22%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.85), transparent 72%);
  filter: blur(0.5px);
  pointer-events: none;
}

/* portrait variant: the headshot looks encased in a glass orb — colour rim,
   convex curvature shading, an edge vignette, a rim light at the base and a
   layered specular highlight on top. */
.avatar__disc.has-photo {
  overflow: hidden;
  background: color-mix(in srgb, var(--c) 60%, black);
  box-shadow:
    /* coloured glass rim */
    inset 0 0 0 2px color-mix(in srgb, var(--c) 70%, white),
    /* inner shading: dark toward the bottom-right, light toward the top */
    inset 0 -7px 12px -4px rgba(0, 0, 0, 0.55),
    inset 0 6px 10px -4px rgba(255, 255, 255, 0.4),
    /* drop shadow grounding the sphere */
    0 9px 22px -8px rgba(0, 0, 0, 0.7);
}
.avatar__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  z-index: 1;
}
/* glass body: convex curvature + edge darkening over the photo */
.avatar__disc.has-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  z-index: 2;
  pointer-events: none;
  background:
    radial-gradient(115% 115% at 30% 20%, rgba(255, 255, 255, 0.14) 0%, transparent 40%),
    radial-gradient(circle at 70% 86%, color-mix(in srgb, var(--c) 60%, white) 0%, transparent 22%),
    radial-gradient(100% 100% at 50% 48%, transparent 50%, rgba(0, 0, 0, 0.34) 100%);
}
/* specular: soft top-left sheen + a small hot glint, like light on glass */
.avatar__disc.has-photo::after {
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 3;
  filter: none;
  background:
    radial-gradient(38% 27% at 30% 19%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.22) 46%, transparent 70%),
    radial-gradient(11% 8% at 63% 29%, rgba(255, 255, 255, 0.95), transparent 70%);
}
.avatar--lg .avatar__disc {
  font-size: 1.7em;
}
.avatar--sm .avatar__disc {
  font-size: 0.95em;
}
.avatar__pending {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 100px;
  /* red-ish: this is the count of things still left to do */
  background: #ec5a5a;
  color: #fff;
  font-size: 10.5px;
  font-weight: 600;
  display: grid;
  place-items: center;
  border: 2px solid var(--bg);
}
/* focus is shown as a soft halo glow — NOT a hard ring — so the orb's own
   donut (with its subtle unfilled track) still reads the same as the others. */
.node.is-focus .avatar__disc {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08),
    0 0 20px 4px rgba(255, 255, 255, 0.14);
}
.node.is-focus .avatar__disc.has-photo {
  box-shadow:
    inset 0 0 0 2px color-mix(in srgb, var(--c) 70%, white),
    inset 0 -7px 12px -4px rgba(0, 0, 0, 0.55),
    inset 0 6px 10px -4px rgba(255, 255, 255, 0.4),
    0 9px 22px -8px rgba(0, 0, 0, 0.7),
    0 0 20px 4px rgba(255, 255, 255, 0.16);
}
.avatar.is-pulse {
  animation: pulse 0.7s ease;
}
@keyframes pulse {
  0% { transform: scale(1); }
  35% { transform: scale(1.16); }
  100% { transform: scale(1); }
}

/* ---- console ----------------------------------------------- */

.console {
  flex: 0 0 auto;
  margin: 0 12px 14px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-line);
  border-radius: 26px;
  padding: 8px 18px 18px;
  /* Three detents: small / medium / large. Swipe up/down (or tap the grip) to
     move between them — the duty list scrolls within whichever height. */
  height: 42%;
  min-height: 220px;
  max-height: 86%;
  transition: height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  position: relative;
}
.console[data-detent="1"] {
  height: 62%;
}
.console[data-detent="2"] {
  height: 82%;
}
/* grab handle — the swipe/tap target for switching detents */
.console__grip {
  flex: 0 0 auto;
  width: 40px;
  height: 4px;
  border-radius: 100px;
  background: var(--ink-faint);
  opacity: 0.55;
  margin: 2px auto 8px;
  cursor: grab;
  touch-action: none;
}
@media (prefers-reduced-motion: reduce) {
  .console {
    transition: none;
  }
}
.console__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.console__id {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.console__name {
  font-size: 17px;
  font-weight: 600;
}
.console__lvl {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.console__edit {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-line);
  color: var(--ink-dim);
  width: 32px;
  height: 32px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
}

/* pager dots — swipe / tap to move between people */
/* warp-out / warp-in when focus moves person-to-person.
   The old card scales down + blurs + fades away, then the new card warps in. */
.console.is-warp-out {
  animation: console-warp-out 0.18s cubic-bezier(0.4, 0, 1, 1) forwards;
}
.console.is-warp-in {
  animation: console-warp-in 0.34s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes console-warp-out {
  from {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
  to {
    opacity: 0;
    transform: scale(0.85) translateY(8px);
    filter: blur(7px);
  }
}
@keyframes console-warp-in {
  from {
    opacity: 0;
    transform: scale(1.1) translateY(-6px);
    filter: blur(9px);
  }
  55% {
    opacity: 1;
  }
  to {
    opacity: 1;
    transform: scale(1);
    filter: blur(0);
  }
}
@media (prefers-reduced-motion: reduce) {
  .console.is-warp-out,
  .console.is-warp-in {
    animation: none;
  }
}

/* name doubles as a toggle — tap it to reveal the domain description */
.console__name--btn {
  appearance: none;
  -webkit-appearance: none;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-align: left;
}
.console__namecaret {
  font-size: 10px;
  color: var(--ink-faint);
  transition: transform 0.25s ease;
}
.console__name--btn[aria-expanded="true"] .console__namecaret {
  transform: rotate(180deg);
}
/* collapsible domain description */
.console__desc {
  margin: 0;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  font-size: 13.5px;
  color: var(--ink-dim);
  line-height: 1.5;
  transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.3s ease;
}
.console__desc.is-open {
  max-height: 200px;
  opacity: 1;
  margin: 10px 0 2px;
}

.console__empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  padding: 18px 10px;
}
.console__emptytitle {
  font-size: 16px;
  font-weight: 600;
}
.console__emptysub {
  font-size: 13px;
  color: var(--ink-dim);
  max-width: 240px;
  line-height: 1.5;
}
/* the CTA shouldn't stretch to fill the column — keep it a normal button */
.console__empty .btn {
  flex: 0 0 auto;
  min-width: 200px;
  margin-top: 8px;
}

/* ---- duties ------------------------------------------------ */

/* the whole boundary stack scrolls as one; recognition stays pinned below */
.console__scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.duties {
  list-style: none;
  margin: 10px 0 0;
}
.duty {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}
/* right-side meta: a cadence tag (the day) + a state word */
.duty__meta {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.duty__tag {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.03em;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 2px 7px;
}
/* your own chore's pill is the control — tap it to set/change the rhythm */
.duty__tag--btn {
  cursor: pointer;
  font-family: var(--mono);
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
/* a small caret signals the pill opens a picker (same language as Recognize ▾),
   so it reads as tappable at rest — not a static read-only tag */
.duty__tag--btn::after {
  content: "▾";
  margin-left: 4px;
  font-size: 0.9em;
  opacity: 0.6;
}
.duty__tag--btn:hover {
  border-color: rgba(140, 155, 255, 0.45);
}
.duty__tag--unset {
  border-style: dashed;
  opacity: 0.85;
}
/* LIVE — awake today: the tag glows in the accent */
.duty.status-live .duty__tag {
  color: var(--accent);
  border-color: rgba(140, 155, 255, 0.35);
  background: rgba(140, 155, 255, 0.1);
}
/* OVERDUE — its day passed and it's still open: a catchable drop */
.duty.status-overdue .duty__tag {
  color: #f0b07a;
  border-color: rgba(240, 176, 122, 0.42);
  background: rgba(240, 176, 122, 0.12);
}
.duty.status-overdue .duty__by {
  color: #f0b07a;
}
.duty.status-overdue .duty__check {
  border-color: rgba(240, 176, 122, 0.7);
}
/* ASLEEP — sleeping until its day: calm, faint context */
.duty.status-asleep {
  opacity: 0.5;
}
.duty.status-asleep .duty__check {
  border-color: var(--line);
}
.duty__check {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 9px;
  border: 1.6px solid var(--ink-faint);
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, border-color 0.2s;
}
.duty__check svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: #0a0b1e;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.15s;
}
.duty__check.is-readonly {
  opacity: 0.5;
  cursor: default;
}
.duty.is-done .duty__check {
  background: #7cc88f;
  border-color: #7cc88f;
}
.duty.is-done .duty__check svg {
  opacity: 1;
}
.duty__label {
  flex: 1;
  font-size: 14px;
}
.duty.is-done .duty__label {
  color: var(--ink-faint);
  text-decoration: line-through;
}
.duty__by {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}
.duty.is-done .duty__by {
  color: #6fae80;
}
/* "cover this for them" — an open boundary you can catch when it's not yours */
.duty__check--cover {
  border-color: rgba(232, 176, 75, 0.7);
  border-style: dashed;
}
.duty__check--cover:hover {
  background: rgba(232, 176, 75, 0.16);
}
.duty__check--cover svg {
  stroke: #e8b04b;
  opacity: 0.9;
}
/* a boundary that someone OTHER than its owner caught — amber, not green */
.duty.is-covered.is-done .duty__check {
  background: #e8b04b;
  border-color: #e8b04b;
}
.duty.is-covered.is-done .duty__by {
  color: #d9a23f;
}

/* the resting boundaries — asleep + already-cleared, kept calm below a quiet
   hairline (no label) that separates them from what's live above */
/* rhythm rows flow as one continuous list under the live ones — no divider,
   each row carries its own single hairline so it reads as one grid */
.rhythm {
  margin-top: 0;
}
.rhythm .duties {
  margin-top: 0;
}
.duties--rhythm .duty {
  border-bottom-color: rgba(255, 255, 255, 0.05);
}
/* nothing awake today */
.duties__allclear {
  margin: 12px 0 0;
  padding: 16px 0 6px;
  text-align: center;
  font-size: 13.5px;
  color: var(--ink-dim);
}
.duties__allclear span {
  display: block;
  margin-top: 4px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-faint);
}

/* ---- recognition ------------------------------------------- */

.give {
  display: flex;
  gap: 10px;
  margin-top: 14px;
}
/* ambient "tokens received this week" pill in the console header */
.console__tokens {
  flex: 0 0 auto;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 9px;
  border-radius: 100px;
  border: 1px solid rgba(255, 210, 122, 0.22);
  background: rgba(255, 210, 122, 0.1);
  color: #ffd27a;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.btn {
  flex: 1;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s, border-color 0.2s;
}
.btn:active {
  transform: scale(0.97);
}
.btn--primary {
  background: var(--accent);
  border-color: transparent;
  color: #0a0b1e;
  font-weight: 600;
}
.btn--cheer {
  background: rgba(255, 210, 122, 0.12);
  border-color: rgba(255, 210, 122, 0.3);
  color: #ffd27a;
}
.btn--small {
  flex: 0 0 auto;
  padding: 8px 16px;
  font-size: 13px;
}
/* small "⚡N banked" pip on the Recognize / Use-a-power button */
.btn__pip {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 100px;
  background: rgba(10, 11, 30, 0.22);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--mono);
}
.give--self {
  flex-direction: column;
  align-items: stretch;
}
.give--self .recv {
  margin-top: 0;
}

/* ---- power picker (recognition menu) ----------------------- */

.powermenu {
  position: absolute;
  inset: 0;
  z-index: 12;
  display: flex;
  align-items: flex-end;
  border-radius: 26px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
}
.console.is-powers .powermenu {
  opacity: 1;
  pointer-events: auto;
}
.powermenu__scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 18, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.powermenu__panel {
  position: relative;
  width: 100%;
  background: rgba(16, 18, 40, 0.96);
  border-top: 1px solid var(--glass-line);
  border-radius: 22px 22px 26px 26px;
  padding: 14px 14px 16px;
  transform: translateY(12px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: 100%;
  overflow-y: auto;
}
.console.is-powers .powermenu__panel {
  transform: translateY(0);
}
.powermenu__head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 4px 12px;
}
.powermenu__title {
  flex: 1 1 auto;
  font-size: 14px;
  font-weight: 600;
}
.powermenu__bank {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  color: #ffd27a;
}
.powermenu__close {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s, background 0.2s;
}
.powermenu__close:active {
  transform: scale(0.92);
}
.powermenu__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pwr {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--ink);
  font-family: var(--font);
  cursor: pointer;
  transition: transform 0.12s, background 0.2s, border-color 0.2s;
}
.pwr:active {
  transform: scale(0.98);
}
.pwr.is-locked {
  opacity: 0.4;
  cursor: not-allowed;
}
.pwr--free {
  background: rgba(255, 210, 122, 0.1);
  border-color: rgba(255, 210, 122, 0.28);
}
.pwr__icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.07);
  font-size: 16px;
  color: #ffd27a;
}
.pwr__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pwr__name {
  font-size: 14px;
  font-weight: 600;
}
.pwr__desc {
  font-size: 11.5px;
  color: var(--ink-dim);
  line-height: 1.3;
}
.pwr__cost {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
  font-family: var(--mono);
  color: #ffd27a;
}
.pwr__cost--free {
  color: var(--ink-dim);
}

/* ---- roles sheet ------------------------------------------- */

.sheet {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
}
.sheet[hidden] {
  display: none;
}
.sheet__scrim {
  position: absolute;
  inset: 0;
  background: rgba(5, 6, 18, 0.6);
  opacity: 0;
  transition: opacity 0.26s;
}
.sheet.is-open .sheet__scrim {
  opacity: 1;
}
.sheet__panel {
  position: relative;
  width: 100%;
  background: #12132e;
  border-top: 1px solid var(--glass-line);
  border-radius: 28px 28px 42px 42px;
  padding: 10px 18px 22px;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.25, 1, 0.4, 1);
  max-height: 88%;
  overflow-y: auto;
  /* keep a downward drag-to-dismiss from triggering native overscroll bounce */
  overscroll-behavior: contain;
  touch-action: pan-y;
}
.sheet.is-open .sheet__panel {
  transform: translateY(0);
}
.sheet__grip {
  width: 38px;
  height: 4px;
  border-radius: 100px;
  background: var(--ink-faint);
  margin: 4px auto 12px;
}
.sheet__head h3 {
  font-size: 18px;
  font-weight: 600;
}
.sheet__head p {
  font-size: 13px;
  color: var(--ink-dim);
  line-height: 1.5;
  margin-top: 5px;
}

.rolelist {
  margin: 16px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rolelist__empty {
  margin: 8px 0;
  padding: 28px 16px;
  text-align: center;
  font-size: 14px;
  color: var(--ink-dim);
}
.role {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 15px;
}
.role.is-yours {
  border-color: rgba(140, 155, 255, 0.4);
  background: rgba(140, 155, 255, 0.06);
}
.role__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.role__name {
  font-weight: 600;
  font-size: 15px;
}
.role__owner {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-dim);
}
.role__owner::before {
  content: "";
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c);
}
.role__open {
  font-family: var(--mono);
  font-size: 10.5px;
  color: #7cc88f;
  letter-spacing: 0.08em;
}
/* the cadence pill, as a tap target in the pool */
.role__open--btn {
  background: rgba(124, 200, 143, 0.08);
  border: 1px solid rgba(124, 200, 143, 0.3);
  border-radius: 100px;
  padding: 2px 9px 2px 8px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.role__open--btn::after {
  content: "›";
  margin-left: 5px;
  opacity: 0.6;
}
.role__open--btn:hover {
  background: rgba(124, 200, 143, 0.16);
}
.role__open--unset {
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  border-color: var(--line);
  border-style: dashed;
}
.role__domain {
  font-size: 12.5px;
  color: var(--ink-dim);
  line-height: 1.45;
  margin: 7px 0 10px;
}
.role__act {
  display: flex;
  justify-content: flex-end;
}
.role__lock,
.role__yours {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-faint);
}
.role__yours {
  color: var(--accent);
}

/* ---- cadence picker ----------------------------------------------------- */
#cadence-label {
  display: inline;
  color: var(--ink-dim);
  font-style: italic;
}
/* room above the options (off the header) and below the days (off Cancel) */
#cadence-body {
  margin: 22px 0 24px;
}
.cadpick {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-bottom: 20px;
}
.cadpick__opt {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  text-align: left;
  transition: background 0.15s, border-color 0.15s;
}
.cadpick__opt:hover {
  border-color: rgba(140, 155, 255, 0.4);
}
.cadpick__opt.is-on {
  border-color: var(--accent);
  background: rgba(140, 155, 255, 0.12);
}
.cadpick__opt-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
}
.cadpick__opt-sub {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.02em;
  color: var(--ink-dim);
}
.cadpick__weekly {
  border-top: 1px solid var(--line);
  padding-top: 14px;
}
.cadpick__weekly-label {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin: 0 0 10px;
}
.cadpick__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
.cadpick__day {
  padding: 10px 0;
  border-radius: 11px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--ink-dim);
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.cadpick__day:hover {
  border-color: rgba(140, 155, 255, 0.4);
  color: var(--ink);
}
.cadpick__day.is-on {
  border-color: var(--accent);
  background: rgba(140, 155, 255, 0.16);
  color: var(--accent);
}
.sheet__done {
  width: 100%;
  padding: 13px;
  border-radius: 14px;
  border: 1px solid var(--glass-line);
  background: rgba(255, 255, 255, 0.05);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}

/* ---- weekly balance --------------------------------------- */

.balance__lead {
  font-size: 15px;
  line-height: 1.4;
  margin: 2px 0 16px;
  color: var(--ink);
}
.balance {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 16px;
}
.bal {
  display: grid;
  grid-template-columns: 96px 1fr auto;
  align-items: center;
  gap: 10px;
}
.bal__who {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.bal__disc {
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: #0a0b1e;
  background: var(--c, #8c9bff);
  box-shadow: 0 0 0 1.5px color-mix(in srgb, var(--c, #8c9bff) 55%, transparent);
}
.bal__disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bal__name {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bal__track {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 8px;
}
.bal__seg {
  height: 8px;
  border-radius: 4px;
  min-width: 0;
  transition: width 0.5s ease;
}
.bal__seg--caught {
  background: #7cc88f;
}
.bal__seg--slip {
  background: #e8b04b;
}
.bal__nums {
  display: flex;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
}
.bal__caught {
  color: #7cc88f;
}
.bal__slip {
  color: #e8b04b;
}
.balance__foot {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--ink-faint);
  margin: 0 0 16px;
}
.bal__key {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 3px;
}
.bal__key--caught {
  background: #7cc88f;
}
.bal__key--slip {
  background: #e8b04b;
}

/* ---- Captain's Log: the weekly mythology ------------------- */
.balance__log {
  display: block;
  width: 100%;
  margin: 4px 0 14px;
  padding: 13px 16px;
  border: 1px solid var(--glass-line);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(140, 155, 255, 0.12), rgba(140, 155, 255, 0.04));
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: border-color 0.18s ease, transform 0.12s ease, background 0.18s ease;
}
.balance__log:hover {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(140, 155, 255, 0.2), rgba(140, 155, 255, 0.06));
}
.balance__log:active {
  transform: scale(0.985);
}

/* the log panel reads like a starship readout — deeper, more cinematic */
.sheet--log .sheet__panel {
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(122, 142, 224, 0.22), transparent 60%),
    linear-gradient(180deg, #0e1030 0%, #0a0b1e 100%);
}
.log__head {
  text-align: center;
  padding: 6px 0 14px;
  border-bottom: 1px solid var(--glass-line);
  margin-bottom: 16px;
}
.log__badge {
  display: inline-block;
  font-family: "Orbitron", var(--mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 12px;
  border: 1px solid rgba(140, 155, 255, 0.35);
  border-radius: 999px;
  margin-bottom: 12px;
}
.log__stardate {
  font-family: "Orbitron", var(--mono);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0;
}
.log__ship {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--ink-dim);
  margin: 4px 0 0;
}
.log__scroll {
  padding: 0 2px;
}
.log__beat {
  font-size: 15px;
  line-height: 1.62;
  color: var(--ink);
  margin: 0 0 18px;
  /* gentle staggered fade so beats settle in like log entries printing */
  animation: logBeat 0.5s ease both;
}
.log__beat[data-lede="1"] {
  font-size: 16.5px;
  font-weight: 500;
}
.log__beat:nth-child(2) { animation-delay: 0.08s; }
.log__beat:nth-child(3) { animation-delay: 0.16s; }
.log__beat:nth-child(4) { animation-delay: 0.24s; }
.log__beat:nth-child(5) { animation-delay: 0.32s; }
.log__beat:nth-child(6) { animation-delay: 0.40s; }
@keyframes logBeat {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.log__receipts {
  display: flex;
  justify-content: center;
  gap: 18px;
  flex-wrap: wrap;
  margin: 6px 0 18px;
  padding-top: 16px;
  border-top: 1px solid var(--glass-line);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  text-transform: uppercase;
}
.log__receipts strong {
  color: var(--ink);
  font-size: 14px;
}

/* ---- fx + toast -------------------------------------------- */

.fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 15;
  overflow: hidden;
}
.particle {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
  animation: fling var(--d) cubic-bezier(0.3, 0.7, 0.2, 1) var(--delay) forwards;
}
@keyframes fling {
  0% {
    transform: translate(0, 0) scale(0.4);
    opacity: 0;
  }
  15% {
    opacity: 1;
  }
  100% {
    transform: translate(var(--tx), var(--ty)) scale(1);
    opacity: 0;
  }
}

/* level-up celebration: golden token-stars bloom outward from the avatar */
.sparkle {
  position: absolute;
  color: #ffd76a;
  line-height: 1;
  pointer-events: none;
  text-shadow: 0 0 7px rgba(255, 215, 106, 0.85);
  transform: translate(-50%, -50%) scale(0);
  animation: sparkle-pop var(--d, 900ms) cubic-bezier(0.2, 0.7, 0.2, 1)
    var(--delay, 0ms) forwards;
  will-change: transform, opacity;
}
@keyframes sparkle-pop {
  0% {
    transform: translate(-50%, -50%) translate(0, 0) scale(0) rotate(0deg);
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  55% {
    transform: translate(-50%, -50%) translate(var(--tx), var(--ty)) scale(1.15)
      rotate(var(--rot));
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%)
      translate(calc(var(--tx) * 1.3), calc(var(--ty) * 1.3)) scale(0.2)
      rotate(var(--rot));
    opacity: 0;
  }
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 16px);
  z-index: 25;
  background: rgba(10, 11, 30, 0.92);
  border: 1px solid var(--glass-line);
  color: var(--ink);
  font-size: 12.5px;
  padding: 9px 16px;
  border-radius: 100px;
  opacity: 0;
  transition: opacity 0.24s, transform 0.24s;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  white-space: nowrap;
  max-width: 90%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toast.is-on {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ============================================================
   FTUX — the family-event onboarding
   ============================================================ */

.ftux {
  position: absolute;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  color: var(--ink);
  /* inside the ship, pre-launch: enclosed hull, cool cabin key light from
     the ceiling, a warm idle-thruster glow pooling on the floor */
  background:
    radial-gradient(150% 55% at 50% -14%, rgba(122, 142, 224, 0.20), transparent 62%),
    radial-gradient(125% 48% at 50% 114%, rgba(255, 138, 78, 0.11), transparent 60%),
    linear-gradient(180deg, #0b0e1c 0%, #080a16 52%, #06070f 100%);
  animation: ftuxFade 0.4s ease both;
}
/* enclosure: inset vignette + a thin lit ceiling edge */
.ftux::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  box-shadow:
    inset 0 0 130px 12px rgba(0, 0, 0, 0.55),
    inset 0 1px 0 rgba(150, 170, 255, 0.16);
}
/* faint hull paneling — seams running down the cabin walls */
.ftux::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
  background:
    repeating-linear-gradient(180deg, transparent 0 46px, rgba(255, 255, 255, 0.022) 46px 47px),
    repeating-linear-gradient(90deg, transparent 0 72px, rgba(255, 255, 255, 0.016) 72px 73px);
  -webkit-mask-image: radial-gradient(150% 100% at 50% 46%, #000 32%, transparent 86%);
  mask-image: radial-gradient(150% 100% at 50% 46%, #000 32%, transparent 86%);
}
/* keep the prep UI above the decorative hull layers */
.ftux > * {
  position: relative;
  z-index: 1;
}
.ftux[hidden] {
  display: none;
}
@keyframes ftuxFade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes ftuxRise {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

/* ============================================================
   BLAST-OFF — the cabin shakes, the crew is flung into space
   ============================================================ */

/* the cabin rumbles, builds, then lurches up and out */
.ftux.is-launching {
  animation: launchRumble 1.4s ease-in forwards;
  pointer-events: none;
}
@keyframes launchRumble {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-1px, 1px); }
  20%  { transform: translate(1px, -1px); }
  32%  { transform: translate(-1.5px, 1px); }
  44%  { transform: translate(2px, -1.5px); }
  56%  { transform: translate(-2.5px, 2px); }
  68%  { transform: translate(3px, -2px); }
  80%  { transform: translate(-3.5px, 2.5px); }
  88%  { transform: translate(2.5px, -3px); }
  100% { transform: translate(0, -10px); opacity: 0; }
}
/* the crew (reveal cards) tighten under g-force, then blast upward */
.ftux.is-launching .ftux__reveal {
  animation: launchLift 1.3s cubic-bezier(0.5, 0, 0.75, 1) forwards;
}
@keyframes launchLift {
  0%   { transform: none; filter: none; }
  50%  { transform: translateY(-4px) scale(0.985); filter: brightness(1.18); }
  100% { transform: translateY(-130%) scale(0.84); opacity: 0; filter: brightness(1.7); }
}

/* full-screen ignition flash — covers the swap to the live board */
#launch-flash {
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(125% 90% at 50% 46%,
    rgba(224, 231, 255, 0.96) 0%,
    rgba(150, 170, 255, 0.5) 38%,
    transparent 76%);
}
#launch-flash.is-on {
  animation: launchFlash 0.95s ease-out forwards;
}
@keyframes launchFlash {
  0%   { opacity: 0; }
  35%  { opacity: 1; }
  100% { opacity: 0; }
}

/* the starfield stretches into warp lines as we punch out */
.starfield.is-warping .star {
  animation: warpStreak 0.75s ease-in forwards;
}
@keyframes warpStreak {
  0%   { transform: translateY(0) scaleY(1); opacity: var(--o); }
  100% { transform: translateY(64px) scaleY(16); opacity: 0.9; }
}

/* each crew member arrives from the void and settles into orbit */
.node__float.is-arriving {
  animation: nodeArrive 0.9s cubic-bezier(0.2, 0.8, 0.3, 1) both;
}
@keyframes nodeArrive {
  0%   { opacity: 0; transform: scale(0.2) translateY(-54px); filter: blur(2px); }
  60%  { opacity: 1; }
  100% { opacity: 1; transform: none; filter: blur(0); }
}

@media (prefers-reduced-motion: reduce) {
  .ftux.is-launching,
  .ftux.is-launching .ftux__reveal,
  #launch-flash.is-on,
  .starfield.is-warping .star,
  .node__float.is-arriving {
    animation: none;
  }
}

/* -- shared bits -- */
.ftux__kicker {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.ftux__bigline {
  font-family: "Orbitron", var(--font);
  font-weight: 600;
  font-size: 27px;
  line-height: 1.2;
  letter-spacing: 0.01em;
}
.ftux__bigline--sm {
  font-size: 22px;
}
.ftux__sub {
  margin-top: 14px;
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-dim);
  max-width: 30ch;
}
.ftux__cta {
  margin-top: 26px;
  align-self: flex-start;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  color: #0a0b1e;
  background: linear-gradient(180deg, #aeb8ff, #8c9bff);
  border: none;
  border-radius: 14px;
  padding: 14px 22px;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 10px 28px -12px rgba(140, 155, 255, 0.8);
}
.ftux__cta:hover {
  transform: translateY(-1px);
}
.ftux__cta:active {
  transform: translateY(0);
}
.ftux__cta:disabled {
  opacity: 0.4;
  cursor: default;
  box-shadow: none;
  transform: none;
}
/* family-name field on the blank/creator opener */
.ftux-nameinput {
  margin-top: 24px;
  align-self: stretch;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 500;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 15px 16px;
  outline: none;
  transition: border-color 0.18s ease, background 0.18s ease;
}
.ftux-nameinput::placeholder {
  color: var(--ink-dim);
  opacity: 0.6;
}
.ftux-nameinput:focus {
  border-color: var(--accent);
  background: rgba(140, 155, 255, 0.07);
}

/* -- cold open -- */
.ftux__open {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  animation: ftuxRise 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

/* -- step scaffold -- */
.ftux__step {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
/* full-bleed centered region (cold open, reveal) */
.ftux__center {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 46px 22px;
}
/* scrolling body between fixed head + static footer */
.ftux__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 0 22px 12px;
}
.ftux__head {
  flex-shrink: 0;
  padding: 46px 22px 16px;
}
.ftux__num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-faint);
  letter-spacing: 0.1em;
}
.ftux__head h2 {
  font-size: 21px;
  font-weight: 600;
  margin-top: 6px;
}
.ftux__head p {
  margin-top: 8px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-dim);
}
.ftux__nav {
  flex-shrink: 0;
  padding: 14px 22px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(150, 170, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(150, 170, 255, 0.06);
  background: linear-gradient(180deg, #0c1020 0%, #07090f 100%);
}
.ftux__back {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--ink-dim);
  background: none;
  border: none;
  padding: 12px 4px;
  cursor: pointer;
}
.ftux__back:hover {
  color: var(--ink);
}
.ftux__next {
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  color: #0a0b1e;
  background: linear-gradient(180deg, #aeb8ff, #8c9bff);
  border: none;
  border-radius: 12px;
  padding: 13px 20px;
  cursor: pointer;
  transition: transform 0.15s, opacity 0.2s;
}
.ftux__next:hover {
  transform: translateY(-1px);
}
.ftux__next:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  filter: grayscale(0.4);
}

/* -- avatar disc -- */
.ftux-disc {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #1b1d3e;
  border: 2px solid var(--c, var(--accent));
  color: var(--ink);
  font-weight: 600;
  font-size: 18px;
  overflow: hidden;
  flex-shrink: 0;
}
.ftux-disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* -- step 01: crew -- */
.ftux-crew {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 16px 14px;
  /* the remove (×) badge overhangs each card's top by a few px — give the first
     row headroom so the scroll container doesn't clip it */
  padding-top: 8px;
}
.ftux-crew__card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 76px;
}
.ftux-crew__remove {
  position: absolute;
  top: -3px;
  right: 4px;
  z-index: 2;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  padding: 0;
  border-radius: 50%;
  border: 1px solid var(--glass-line);
  background: #14162e;
  color: var(--ink-dim);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.15s, color 0.15s, border-color 0.15s, background 0.15s;
}
.ftux-crew__remove:hover {
  opacity: 1;
  color: #ff9aa6;
  border-color: rgba(255, 154, 166, 0.5);
  background: #1c1530;
}
.ftux-crew__disc {
  width: 60px;
  height: 60px;
  font-size: 22px;
}
.ftux-crew__name {
  width: 100%;
  text-align: center;
  font-family: var(--font);
  font-size: 13px;
  color: var(--ink);
  background: transparent;
  border: none;
  border-bottom: 1px dashed var(--line);
  padding: 3px 0;
  outline: none;
  transition: border-color 0.2s;
}
.ftux-crew__name:focus {
  border-color: var(--accent);
}
.ftux-crew__add {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 76px;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-dim);
  background: none;
  border: none;
  cursor: pointer;
}
.ftux-crew__add::before {
  content: "＋";
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 1.5px dashed var(--ink-faint);
  font-size: 22px;
  color: var(--ink-dim);
  transition: border-color 0.2s, color 0.2s;
}
.ftux-crew__add > * {
  display: none;
}
.ftux-crew__add:hover::before {
  border-color: var(--accent);
  color: var(--accent);
}

/* -- step 02: the work -- */
.ftux-lib {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ftux-cat__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}
.ftux-cat__label {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
/* per-category select-all — fast path for an exhaustive list */
.ftux-cat__all {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--glass-line);
  border-radius: 100px;
  padding: 3px 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.ftux-cat__all:hover {
  border-color: rgba(140, 155, 255, 0.45);
  color: var(--ink);
}
.ftux-cat__all.is-on {
  color: var(--accent);
  border-color: rgba(140, 155, 255, 0.4);
  background: rgba(140, 155, 255, 0.12);
}
.ftux-cat__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.ftux-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 8px 14px 8px 11px;
  cursor: pointer;
  transition: color 0.16s, background 0.16s, border-color 0.16s;
}
.ftux-chip:hover {
  color: var(--ink);
  border-color: var(--glass-line);
}
.ftux-chip.is-on {
  color: var(--ink);
  background: rgba(140, 155, 255, 0.16);
  border-color: rgba(140, 155, 255, 0.6);
}
/* a permanent checkbox circle — always present so selecting never reflows */
.ftux-chip__box {
  position: relative;
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1.5px solid var(--ink-faint);
  transition: background 0.16s, border-color 0.16s;
}
.ftux-chip:hover .ftux-chip__box {
  border-color: var(--ink-dim);
}
.ftux-chip.is-on .ftux-chip__box {
  background: var(--accent);
  border-color: var(--accent);
}
.ftux-chip.is-on .ftux-chip__box::after {
  content: "";
  position: absolute;
  left: 5px;
  top: 2px;
  width: 4px;
  height: 8px;
  border: solid #0a0b1e;
  border-width: 0 1.8px 1.8px 0;
  transform: rotate(45deg);
}
.ftux-freeadd__row {
  display: flex;
  gap: 8px;
}
.ftux-freeadd__cat,
.ftux-freeadd__in {
  font-family: var(--font);
  font-size: 12.5px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 11px;
  outline: none;
}
.ftux-freeadd__cat {
  flex-shrink: 0;
  max-width: 38%;
}
.ftux-freeadd__in {
  flex: 1;
  min-width: 0;
}
.ftux-freeadd__in:focus,
.ftux-freeadd__cat:focus {
  border-color: var(--accent);
}
.ftux-freeadd__btn {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink);
  background: rgba(140, 155, 255, 0.12);
  border: 1px solid rgba(140, 155, 255, 0.4);
  border-radius: 10px;
  padding: 0 14px;
  cursor: pointer;
}

/* -- step 03: the draft -- */
.ftux-claims {
  display: flex;
  flex-direction: column;
  gap: 10px;
  list-style: none;
}
.ftux-claim {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 11px 13px;
  transition: border-color 0.2s, background 0.2s;
}
/* unclaimed rows read as waiting on you: dashed edge + accented prompt */
.ftux-claim.is-open {
  border-style: dashed;
  border-color: rgba(140, 155, 255, 0.32);
}
.ftux-claim.is-open .ftux-claim__cat {
  color: var(--accent);
}
.ftux-claim.is-claimed {
  background: rgba(255, 255, 255, 0.02);
}
.ftux-claim__chore {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.ftux-claim__label {
  font-size: 14px;
  color: var(--ink);
}
.ftux-claim__cat {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.ftux-claim__faces {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}
.ftux-claim__face {
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0.42;
  filter: grayscale(0.5);
  transition: opacity 0.16s, filter 0.16s, transform 0.16s;
}
.ftux-claim__face .ftux-disc {
  width: 34px;
  height: 34px;
  font-size: 14px;
  border-width: 2px;
}
.ftux-claim__face:hover {
  opacity: 0.8;
}
.ftux-claim__face.is-on {
  opacity: 1;
  filter: none;
  transform: scale(1.08);
}

/* -- step 04: the reveal -- */
.ftux__reveal {
  margin: auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.ftux__reveal .ftux__kicker {
  animation: ftuxRise 0.5s ease both;
}
.ftux__reveal .ftux__bigline {
  animation: ftuxRise 0.5s ease 0.08s both;
}
.ftux-reveal__grid {
  margin: 26px 0 8px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.ftux-reveal__card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
  animation: ftuxRise 0.55s cubic-bezier(0.2, 0.9, 0.3, 1) both;
  animation-delay: calc(var(--i) * 260ms + 260ms);
}
.ftux-reveal__disc {
  width: 56px;
  height: 56px;
}
.ftux-reveal__person {
  font-size: 13px;
  color: var(--ink-dim);
}
.ftux-reveal__title {
  font-family: "Orbitron", var(--font);
  font-weight: 600;
  font-size: 14px;
  color: var(--c, var(--accent));
  letter-spacing: 0.01em;
  animation: ftuxRise 0.5s ease both;
  animation-delay: calc(var(--i) * 260ms + 520ms);
}
.ftux-reveal__crown {
  margin: 22px 0 4px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--ink-dim);
  animation: ftuxRise 0.6s ease 1.4s both;
}
.ftux-reveal__crowng {
  display: inline-block;
  animation: crownPulse 2.6s ease-in-out 1.8s infinite;
}
@keyframes crownPulse {
  0%, 100% { transform: scale(1); opacity: 0.85; filter: drop-shadow(0 0 0 transparent); }
  50% { transform: scale(1.16); opacity: 1; filter: drop-shadow(0 0 8px rgba(232, 176, 75, 0.7)); }
}
.ftux__reveal .ftux__cta {
  align-self: center;
  margin-top: 22px;
  animation: ftuxRise 0.6s ease 1.6s both;
}

/* ---- standalone (installed) ------------------------------- */

/* ============ STANDALONE (installed to home screen) ============
   When launched as a PWA we drop the desktop stage chrome (nav, bezel,
   marketing aside, simulated status bar) and scale the authored 366px
   canvas up to fill the device — so icons/type/buttons match the device
   instead of rendering at their small authored size. The scale factor is
   window.innerWidth / 366, computed at runtime by fitStandalone() in
   index.html (vw units evaluate unreliably in an iOS home-screen PWA);
   the value below is a first-paint default. */
.is-standalone .stage-nav,
.is-standalone .stage__hint,
.is-standalone .status {
  display: none;
}
.is-standalone,
.is-standalone body {
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
  overscroll-behavior: none;
}
.is-standalone .stage {
  display: block;
  max-width: none;
  margin: 0;
  padding: 0;
}
.is-standalone .phone {
  width: 100%;
}
.is-standalone .phone__bezel {
  width: 100%;
  height: 100dvh;
  max-height: none;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}
.is-standalone .phone__screen {
  --s: 1.07;
  width: 366px;
  height: calc(100dvh / var(--s));
  max-height: none;
  transform: scale(var(--s));
  transform-origin: top left;
  border-radius: 0;
}
/* Keep content clear of the notch / dynamic island on a real device. */
.is-standalone .app {
  padding-top: env(safe-area-inset-top);
}

/* ---- responsive -------------------------------------------- */

@media (max-width: 980px) {
  .stage {
    grid-template-columns: 1fr;
    gap: 28px;
    justify-items: center;
    padding-top: 28px;
  }
  .stage__hint {
    order: 2;
  }
}

/* On a real phone-browser visit, the fixed bezel would overflow — let the
   screen fill the viewport (drop the frame), and move the explainer below. */
@media (max-width: 560px) {
  .stage-nav {
    padding: 14px 18px;
  }
  .stage {
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
  }
  .phone {
    width: 100%;
    order: 1;
  }
  .stage__hint {
    order: 2;
  }
  .phone__bezel {
    width: 100%;
    height: 100svh;
    max-height: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
  }
  .phone__screen {
    border-radius: 0;
    height: 100%;
  }
  .stage__hint {
    max-width: none;
    padding: 26px 22px 40px;
    border-top: 1px solid var(--line);
  }
}

/* ---- multi-device pilot: connecting cover + "who are you?" picker ------- */
.whoami {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  color: var(--ink);
  background:
    radial-gradient(150% 55% at 50% -14%, rgba(122, 142, 224, 0.22), transparent 62%),
    linear-gradient(180deg, rgba(8, 10, 22, 0.94) 0%, rgba(6, 7, 15, 0.97) 100%);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  animation: ftuxFade 0.4s ease both;
}
.whoami__card {
  width: 100%;
  max-width: 320px;
  text-align: center;
}
.whoami__title {
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.whoami__sub {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-dim, rgba(220, 226, 255, 0.62));
  margin: 0 0 24px;
}
.whoami__faces {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.whoami__face {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 16px 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  color: inherit;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.12s ease;
}
.whoami__face:hover {
  border-color: var(--accent);
  background: rgba(140, 155, 255, 0.08);
}
.whoami__face:active {
  transform: scale(0.97);
}
.whoami__disc {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 18px;
  overflow: hidden;
  color: #0a0b1e;
  background: var(--c, var(--accent));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.whoami__disc img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.whoami__name {
  font-size: 13.5px;
  font-weight: 500;
}

/* claimed seats lock — greyed, non-inviting, badged */
.whoami__face.is-taken {
  opacity: 0.5;
  border-style: dashed;
}
.whoami__face.is-taken:hover {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.03);
}
.whoami__badge {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-dim, rgba(220, 226, 255, 0.62));
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

/* claim editor — the single-seat face/name step */
.whoami__facepick {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  margin: 4px 0 4px;
}
.whoami__disc--lg {
  width: 92px;
  height: 92px;
  font-size: 30px;
}
.whoami__facepick:hover .whoami__disc--lg {
  box-shadow: 0 0 0 2px var(--accent), 0 6px 18px rgba(0, 0, 0, 0.4);
}
.whoami__addface {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
}
.whoami__nameinput {
  margin-top: 14px;
  text-align: center;
}
.whoami__actions {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}
.whoami__back {
  flex: 0 0 auto;
  padding: 0 18px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-dim, rgba(220, 226, 255, 0.62));
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.18s ease, color 0.18s ease;
}
.whoami__back:hover {
  border-color: var(--accent);
  color: var(--ink);
}
.whoami__confirm {
  flex: 1 1 auto;
}
