:root {
  color-scheme: dark;
  --cz-bg: #0d1014;
  --cz-panel: #111821;
  --cz-panel-2: #17212c;
  --cz-border: #2b3b4f;
  --cz-text: #f4f7fa;
  --cz-muted: #aebdca;
  --cz-accent: #62d7ff;
  --cz-accent-text: #071018;
  --cz-danger: #ff8f8f;
  --cz-radius: 22px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html,
body { min-height: 100%; margin: 0; background: var(--cz-bg); color: var(--cz-text); }

button,
input { font: inherit; }

.cz-entry-body {
  min-height: 100dvh;
  background:
    radial-gradient(circle at 50% -15%, rgba(72, 126, 162, .22), transparent 42%),
    var(--cz-bg);
}

.cz-entry-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.cz-entry-panel {
  width: min(100%, 520px);
  padding: 28px;
  border: 1px solid var(--cz-border);
  border-radius: var(--cz-radius);
  background: rgba(17, 24, 33, .96);
  box-shadow: 0 26px 90px rgba(0, 0, 0, .48);
}

.cz-entry-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: #172a3a;
  color: var(--cz-accent);
  font-size: 17px;
  font-weight: 800;
  letter-spacing: .05em;
}

.cz-entry-panel h1,
.cz-entry-panel h2 { margin: 20px 0 10px; color: #fff; font-size: clamp(24px, 6vw, 32px); line-height: 1.12; }
.cz-entry-panel h2 { font-size: 21px; }
.cz-entry-lead,
.cz-entry-copy { margin: 0; color: var(--cz-muted); font-size: 15px; line-height: 1.58; }
.cz-entry-status { min-height: 22px; margin: 12px 0 0; color: var(--cz-muted); font-size: 13px; line-height: 1.45; }
.cz-entry-status[data-kind="error"] { color: var(--cz-danger); }

.cz-entry-form { display: grid; gap: 14px; margin-top: 24px; }
.cz-entry-label { display: grid; gap: 8px; color: #d9e3eb; font-size: 13px; font-weight: 650; }
.cz-entry-input {
  width: 100%;
  min-height: 50px;
  border: 1px solid #34475b;
  border-radius: 13px;
  outline: none;
  background: #0e151d;
  color: #fff;
  padding: 0 15px;
  font-size: 16px;
}
.cz-entry-input:focus { border-color: var(--cz-accent); box-shadow: 0 0 0 3px rgba(98, 215, 255, .13); }

.cz-entry-actions { display: grid; gap: 10px; margin-top: 20px; }
.cz-entry-button {
  min-height: 50px;
  border: 1px solid transparent;
  border-radius: 13px;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 750;
}
.cz-entry-button:disabled { cursor: default; opacity: .5; }
.cz-entry-button--primary { background: var(--cz-accent); color: var(--cz-accent-text); }
.cz-entry-button--secondary { border-color: #34475b; background: #18222d; color: var(--cz-text); }
.cz-entry-button--quiet { border-color: #2b3b4f; background: transparent; color: #dce7ef; }

.cz-install-steps { display: grid; gap: 12px; margin: 22px 0 0; padding: 0; list-style: none; counter-reset: install; }
.cz-install-steps li { display: grid; grid-template-columns: 34px 1fr; align-items: start; gap: 11px; color: #d9e3eb; line-height: 1.48; }
.cz-install-steps li::before { counter-increment: install; content: counter(install); display: grid; width: 30px; height: 30px; place-items: center; border-radius: 10px; background: #1c2a37; color: var(--cz-accent); font-weight: 800; }

#case-zero-prestart0719b {
  position: fixed;
  inset: 0;
  z-index: 2147483500;
  overflow: auto;
  background:
    radial-gradient(circle at 50% -12%, rgba(72, 126, 162, .22), transparent 38%),
    var(--cz-bg);
  color: var(--cz-text);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.cz-prestart-wrap { width: min(100%, 720px); min-height: 100%; margin: 0 auto; padding: max(28px, env(safe-area-inset-top)) 18px max(28px, env(safe-area-inset-bottom)); }
.cz-prestart-head { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.cz-prestart-head .cz-entry-mark { flex: 0 0 auto; }
.cz-prestart-head h1 { margin: 0; font-size: 24px; line-height: 1.15; }
.cz-prestart-head p { margin: 4px 0 0; color: var(--cz-muted); font-size: 13px; }
.cz-prestart-card { border: 1px solid var(--cz-border); border-radius: var(--cz-radius); background: rgba(17, 24, 33, .96); padding: 22px; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); }
.cz-prestart-card + .cz-prestart-card { margin-top: 14px; }
.cz-prestart-card h2 { margin: 0 0 8px; font-size: 21px; }
.cz-prestart-card p { margin: 0; color: var(--cz-muted); line-height: 1.5; }
.cz-player-stepper { display: grid; grid-template-columns: 50px 1fr 50px; align-items: center; gap: 10px; }
.cz-player-stepper button { min-height: 48px; border: 1px solid #34475b; border-radius: 13px; background: #18222d; color: #fff; font-size: 23px; cursor: pointer; }
.cz-player-count { text-align: center; font-size: 30px; font-weight: 800; }
.cz-roster { display: grid; gap: 9px; margin: 18px 0 0; padding: 0; list-style: none; }
.cz-roster li { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 11px; min-height: 48px; padding: 7px 10px; border: 1px solid #293a4b; border-radius: 13px; background: #101720; }
.cz-roster-slot { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; background: #1b2b39; color: var(--cz-accent); font-weight: 800; }
.cz-roster-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-roster-role { color: var(--cz-muted); font-size: 12px; }
.cz-release { border: 0; background: transparent; color: #ffadad; cursor: pointer; font-size: 13px; }
.cz-invite-grid { display: grid; grid-template-columns: 190px 1fr; gap: 20px; align-items: center; margin-top: 18px; }
.cz-qr { display: grid; place-items: center; padding: 10px; border-radius: 17px; background: #fff; }
.cz-qr svg { display: block; width: 100%; height: auto; }
.cz-invite-actions { display: grid; gap: 10px; }
.cz-room-count { color: var(--cz-accent); font-weight: 800; }
.cz-recovery { margin-top: 16px; border-top: 1px solid #293a4b; padding-top: 14px; }
.cz-recovery summary { cursor: pointer; color: #dce7ef; font-weight: 650; }
.cz-room-code { margin: 12px 0 0; color: #fff; font-size: 23px; font-weight: 850; letter-spacing: .12em; }
.cz-loading { min-height: 62vh; display: grid; place-items: center; text-align: center; }
.cz-spinner { width: 44px; height: 44px; margin: 0 auto 18px; border: 3px solid #2b3b4f; border-top-color: var(--cz-accent); border-radius: 50%; animation: cz-spin .8s linear infinite; }
@keyframes cz-spin { to { transform: rotate(360deg); } }

@media (max-width: 620px) {
  .cz-entry-panel { padding: 22px; }
  .cz-invite-grid { grid-template-columns: 1fr; }
  .cz-qr { width: min(100%, 230px); margin: 0 auto; }
}

@media (prefers-reduced-motion: reduce) {
  .cz-spinner { animation-duration: 1.8s; }
}
