:root {
  color-scheme: dark;
  --bg: #05070b;
  --panel: rgba(10, 14, 20, 0.72);
  --panel-strong: rgba(12, 17, 24, 0.9);
  --panel-soft: rgba(8, 12, 18, 0.58);
  --line: rgba(120, 168, 202, 0.18);
  --line-strong: rgba(120, 218, 255, 0.28);
  --text: #f4f7fb;
  --muted: #93a5b7;
  --soft: #6c7c8c;
  --cyan: #00d4ff;
  --cyan-soft: #86e6ff;
  --cyan-glow: rgba(0, 212, 255, 0.16);
  --green: #87f0cd;
  --amber: #ffd37a;
  --danger: #ff8da1;
  --shadow: 0 22px 50px rgba(0, 0, 0, 0.34);
  --radius: 26px;
  --radius-sm: 18px;
  --shell-max: 1080px;
  --screen-bottom: calc(126px + env(safe-area-inset-bottom));
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  overflow-x: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
input,
textarea,
select {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  background: transparent;
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.shell-background {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(52% 52% at 18% 12%, rgba(0, 212, 255, 0.16), transparent 72%),
    radial-gradient(36% 40% at 82% 18%, rgba(72, 114, 255, 0.11), transparent 72%),
    linear-gradient(180deg, rgba(5, 8, 12, 0.7), rgba(5, 7, 11, 0.94));
}

#signalCanvas,
.signal-vignette,
.signal-grid,
.signal-orb {
  position: absolute;
  inset: 0;
}

#signalCanvas {
  width: 100%;
  height: 100%;
  opacity: 0.9;
  transition: opacity 180ms ease;
}

.signal-vignette {
  background:
    radial-gradient(circle at 50% 18%, transparent, rgba(5, 7, 11, 0.18) 42%, rgba(5, 7, 11, 0.78) 100%),
    radial-gradient(circle at 50% 100%, rgba(3, 7, 11, 0.88), transparent 38%);
}

.signal-grid {
  opacity: 0.16;
  background:
    linear-gradient(rgba(0, 212, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 100% 24px, 24px 100%;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), transparent 96%);
  transition: opacity 180ms ease;
}

.signal-orb {
  filter: blur(80px);
  opacity: 0.34;
  transition: opacity 180ms ease;
}

.signal-orb-a {
  inset: auto auto 12% -12%;
  width: 40vw;
  height: 40vw;
  max-width: 280px;
  max-height: 280px;
  background: rgba(0, 212, 255, 0.18);
}

.signal-orb-b {
  inset: 8% -10% auto auto;
  width: 34vw;
  height: 34vw;
  max-width: 240px;
  max-height: 240px;
  background: rgba(84, 128, 255, 0.16);
}

.shell-boot {
  position: fixed;
  inset: 0;
  z-index: 9;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: max(24px, env(safe-area-inset-top)) 24px max(24px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 50% 28%, rgba(0, 212, 255, 0.14), transparent 28%),
    linear-gradient(180deg, rgba(7, 10, 14, 0.96), rgba(4, 6, 10, 0.99));
  transition: opacity 240ms ease, visibility 240ms ease;
}

.shell-boot.is-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.boot-core {
  position: relative;
  width: min(320px, calc(100vw - 48px));
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
}

.boot-mark,
.brand-mark,
.eyebrow,
.panel-kicker,
.metric-label,
.section-meta,
.status-line,
.status-pill,
.operative-chip,
.activity-time,
.inline-note {
  font-family: "Space Mono", monospace;
}

.boot-mark {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 700;
  letter-spacing: 0.34em;
}

.boot-sweep {
  position: relative;
  z-index: 1;
  width: min(180px, 54vw);
  height: 2px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}

.boot-sweep span {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(0, 200, 240, 0), rgba(0, 200, 240, 0.95), rgba(124, 109, 250, 0.65));
  box-shadow: 0 0 16px rgba(0, 200, 240, 0.45);
  animation: bootSweep 1.4s ease-in-out infinite;
}

.boot-copy {
  position: relative;
  z-index: 1;
  margin: 0;
  color: rgba(221, 232, 242, 0.72);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.shell-root {
  position: relative;
  z-index: 1;
  width: min(100%, var(--shell-max));
  min-height: var(--app-height, 100dvh);
  margin: 0 auto;
  padding:
    calc(18px + env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    calc(18px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.app-topbar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 6px 4px 2px;
}

.brand-cluster,
.topbar-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-cluster {
  min-width: 0;
}

.brand-mark {
  flex: 0 0 auto;
  padding: 10px 12px;
  border-radius: 16px;
  border: 1px solid rgba(120, 218, 255, 0.2);
  background: rgba(6, 11, 16, 0.54);
  letter-spacing: 0.34em;
  font-size: 11px;
  color: var(--cyan-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.brand-copy {
  min-width: 0;
}

.brand-copy .eyebrow,
.panel-kicker,
.metric-label,
.section-meta,
.status-line,
.inline-note {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 10px;
  color: var(--soft);
}

.brand-copy h1,
.hero-panel h2,
.section-heading h3,
.chat-header h3 {
  margin: 0;
}

.brand-copy h1 {
  font-size: clamp(1.55rem, 4vw, 2.2rem);
  line-height: 1.02;
  font-weight: 700;
  letter-spacing: -0.04em;
}

.topbar-meta {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.status-pill,
.operative-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid rgba(120, 218, 255, 0.18);
  background: rgba(9, 13, 19, 0.62);
  backdrop-filter: blur(24px);
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--cyan);
  box-shadow: 0 0 12px rgba(0, 212, 255, 0.56);
  animation: pulse 2.8s ease-in-out infinite;
}

.operative-chip {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.08);
}

.status-line {
  margin-left: auto;
}

.app-main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

.screen {
  position: absolute;
  inset: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 4px 2px var(--screen-bottom);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(0, 18px, 0);
  transition: opacity 180ms ease, transform 220ms ease;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
}

.screen::-webkit-scrollbar {
  display: none;
}

.screen.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
}

.screen-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.public-screen .screen-stack {
  width: min(100%, 760px);
  margin: 0 auto;
}

.panel {
  position: relative;
  min-width: 0;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(12, 17, 24, 0.86), rgba(8, 12, 18, 0.78));
  backdrop-filter: blur(26px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), var(--shadow);
  padding: 18px;
  overflow: hidden;
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03), transparent 45%);
  pointer-events: none;
}

.hero-panel {
  padding: 22px 20px;
}

.hero-panel::after,
.featured-game-panel::after,
.plans-hero::after,
.settings-hero::after,
.auth-hero::after {
  content: "";
  position: absolute;
  right: -12%;
  top: -14%;
  width: 180px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.22), transparent 72%);
  filter: blur(8px);
}

.hero-panel h2 {
  font-size: clamp(1.62rem, 5vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: -0.05em;
  margin-top: 8px;
}

.hero-panel p,
.panel p,
.mini-card p,
.stat-card p,
.route-card p,
.activity-item p,
.support-copy,
.ticket-item p,
.thread-card p,
.empty-copy {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.hero-panel p {
  margin-top: 12px;
  max-width: 58ch;
}

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.hero-metrics div,
.stat-card,
.mini-card,
.thread-card,
.route-card {
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  padding: 14px;
}

.hero-metrics strong,
.stat-card strong,
.activity-item strong,
.mini-card strong,
.thread-card strong,
.route-card strong,
.composer-input strong,
.ticket-item strong,
.message-bubble strong,
.ticket-message strong {
  display: block;
  margin-top: 6px;
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.section-heading,
.composer-header,
.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.section-heading h3,
.chat-header h3 {
  margin-top: 6px;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.quick-actions,
.route-grid,
.stat-grid,
.game-grid,
.auth-choice-grid,
.support-grid,
.settings-groups,
.responsive-grid {
  display: grid;
  gap: 14px;
}

.quick-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.quick-action,
.route-card,
.settings-item,
.cycle-button,
.option-button,
.text-link,
.primary-button,
.secondary-button,
.destructive-button,
.compact-button,
.nav-item {
  cursor: pointer;
}

.quick-action,
.cycle-button,
.option-button,
.secondary-button,
.compact-button {
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(120, 218, 255, 0.12);
  color: var(--text);
  font-weight: 600;
  text-align: left;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease, color 160ms ease;
}

.quick-action:hover,
.cycle-button:hover,
.option-button:hover,
.secondary-button:hover,
.compact-button:hover,
.settings-item:hover,
.thread-chip:hover,
.route-card:hover,
.ticket-item:hover {
  border-color: rgba(120, 218, 255, 0.26);
  background: rgba(255, 255, 255, 0.06);
}

.primary-button,
.destructive-button,
.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 46px;
  padding: 13px 18px;
  border-radius: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button,
.button-link {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.92), rgba(109, 196, 255, 0.9));
  color: #02131b;
}

.primary-button:hover,
.button-link:hover,
.destructive-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.destructive-button {
  background: linear-gradient(135deg, rgba(255, 141, 161, 0.88), rgba(255, 109, 109, 0.88));
  color: #27070e;
}

.compact-button {
  min-height: 42px;
  padding: 11px 14px;
}

.form-panel form,
.settings-group form,
.support-form-panel form,
.reply-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field-grid {
  display: grid;
  gap: 12px;
}

.field-grid.two-up {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field span {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
}

.text-input {
  width: 100%;
  min-width: 0;
  padding: 14px 15px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(5, 9, 14, 0.72);
  color: var(--text);
  font-size: 16px;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
  appearance: none;
}

.text-input::placeholder {
  color: rgba(147, 165, 183, 0.72);
}

.text-input:focus {
  outline: none;
  border-color: rgba(120, 218, 255, 0.32);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.text-area {
  resize: vertical;
  min-height: 132px;
}

.inline-note {
  color: var(--muted);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.text-link {
  align-self: flex-start;
  padding: 0;
  color: var(--cyan-soft);
  font-size: 0.88rem;
  letter-spacing: 0;
}

.status-message {
  display: none;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.status-message.is-visible {
  display: block;
}

.status-message.is-success {
  border-color: rgba(135, 240, 205, 0.24);
  background: rgba(135, 240, 205, 0.08);
  color: var(--green);
}

.status-message.is-error {
  border-color: rgba(255, 141, 161, 0.24);
  background: rgba(255, 141, 161, 0.08);
  color: var(--danger);
}

.status-message.is-info {
  border-color: rgba(120, 218, 255, 0.24);
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyan-soft);
}

.auth-choice {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-choice h3 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}

.meta-panel .route-grid {
  margin-top: 4px;
}

.responsive-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.stat-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.activity-list,
.settings-list,
.ticket-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item,
.ticket-item {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-time,
.ticket-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  background: rgba(0, 212, 255, 0.08);
  color: var(--cyan-soft);
  font-size: 0.74rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.ticket-status.status-pending {
  background: rgba(255, 211, 122, 0.12);
  color: var(--amber);
}

.ticket-status.status-open,
.ticket-status.status-active {
  background: rgba(0, 212, 255, 0.1);
  color: var(--cyan-soft);
}

.ticket-status.status-resolved,
.ticket-status.status-closed {
  background: rgba(135, 240, 205, 0.1);
  color: var(--green);
}

.route-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.route-card strong {
  margin-top: 0;
}

.route-card p {
  text-align: left;
}

.featured-marquee {
  margin-top: 18px;
  border-radius: 22px;
  border: 1px solid rgba(120, 218, 255, 0.16);
  background:
    linear-gradient(135deg, rgba(0, 212, 255, 0.12), rgba(89, 112, 255, 0.08));
  padding: 16px;
}

.featured-marquee span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
}

.game-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mini-card.highlight,
.thread-card.highlight {
  border-color: rgba(120, 218, 255, 0.24);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.12), rgba(255, 255, 255, 0.04));
}

.onboarding-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.onboarding-frame-wrap {
  position: relative;
  min-height: min(76dvh, 760px);
  border-radius: 24px;
  border: 1px solid rgba(120, 218, 255, 0.14);
  overflow: hidden;
  background: rgba(4, 8, 12, 0.72);
}

#onboardingFrame {
  display: block;
  width: 100%;
  min-height: min(76dvh, 760px);
  border: 0;
  background: rgba(5, 9, 14, 0.94);
}

.thread-rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.thread-rail::-webkit-scrollbar {
  display: none;
}

.thread-chip {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: min(240px, 72vw);
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.03);
  text-align: left;
  color: var(--text);
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}

.thread-chip.is-active {
  border-color: rgba(120, 218, 255, 0.24);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.1), rgba(255, 255, 255, 0.04));
  transform: translateY(-1px);
}

.thread-chip strong {
  font-size: 0.98rem;
  line-height: 1.25;
}

.thread-chip p,
.thread-chip span {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.thread-chip span {
  font-family: "Space Mono", monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.chat-panel {
  display: flex;
  flex-direction: column;
  min-height: clamp(320px, 54dvh, 620px);
}

.chat-messages,
.ticket-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 180px;
  max-height: 52dvh;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-width: none;
}

.chat-messages::-webkit-scrollbar,
.ticket-thread::-webkit-scrollbar {
  display: none;
}

.message-row,
.ticket-message {
  display: flex;
}

.message-row.is-user,
.ticket-message.is-user {
  justify-content: flex-end;
}

.message-row.is-assistant,
.message-row.is-system,
.ticket-message.is-admin,
.ticket-message.is-user {
  justify-content: flex-start;
}

.message-row.is-user {
  justify-content: flex-end;
}

.message-bubble,
.ticket-message-bubble {
  max-width: min(88%, 720px);
  padding: 14px 15px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.message-row.is-user .message-bubble,
.ticket-message.is-user .ticket-message-bubble {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(120, 218, 255, 0.2);
}

.message-row.is-system .message-bubble {
  background: rgba(255, 211, 122, 0.08);
  border-color: rgba(255, 211, 122, 0.18);
}

.message-meta,
.ticket-message-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--soft);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.message-body,
.ticket-message-body {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: var(--text);
  line-height: 1.58;
  font-size: 0.95rem;
}

.empty-state {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border-radius: 20px;
  border: 1px dashed rgba(120, 218, 255, 0.14);
  background: rgba(255, 255, 255, 0.02);
}

.empty-state strong {
  font-size: 1rem;
}

.composer-panel {
  position: sticky;
  bottom: 6px;
  z-index: 2;
}

.composer-surface {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 12px;
  border-radius: 22px;
  border: 1px solid rgba(120, 218, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

.dock-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  flex: 0 0 auto;
}

.dock-button svg,
.nav-item svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.dock-button.accent {
  background: rgba(0, 212, 255, 0.12);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(120, 218, 255, 0.12);
}

.composer-input {
  min-width: 0;
  flex: 1;
}

.composer-textarea {
  width: 100%;
  min-height: 44px;
  max-height: 132px;
  padding: 11px 0;
  border: 0;
  resize: none;
  background: transparent;
  color: var(--text);
  font-size: 16px;
  line-height: 1.45;
}

.composer-textarea:focus {
  outline: none;
}

.composer-textarea::placeholder {
  color: rgba(147, 165, 183, 0.72);
}

.plan-summary-panel .route-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.billing-toggle {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
  padding: 6px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 16px;
}

.cycle-button {
  text-align: center;
}

.cycle-button.is-active {
  color: var(--text);
  background: rgba(0, 212, 255, 0.12);
  box-shadow: inset 0 0 0 1px rgba(120, 218, 255, 0.16);
}

.plan-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 14px;
}

.plan {
  background: linear-gradient(180deg, rgba(13, 17, 23, 0.95), rgba(10, 14, 20, 0.96));
  border: 1px solid rgba(30, 37, 48, 0.95);
  border-radius: 24px;
  padding: 22px 18px 18px;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.plan.popular {
  border-color: rgba(0, 212, 255, 0.52);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.1), 0 18px 32px rgba(0, 212, 255, 0.08);
}

.plan.current {
  border-color: rgba(135, 240, 205, 0.38);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  border-radius: 999px;
  padding: 6px 12px;
  background: linear-gradient(135deg, #00d4ff, #0ee6ff);
  color: #041018;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

.plan-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #728194;
  margin-bottom: 14px;
  min-height: 12px;
}

.plan-name {
  font-size: 22px;
  font-weight: 800;
  color: #f3f7fb;
  margin-bottom: 8px;
}

.plan-price {
  font-size: 34px;
  font-weight: 800;
  color: #00d4ff;
  line-height: 1;
  margin-bottom: 8px;
}

.plan-price span {
  font-size: 13px;
  font-weight: 500;
  color: #7f8a99;
}

.plan-note {
  font-size: 11px;
  color: #8ff0cb;
  min-height: 16px;
  margin-bottom: 4px;
}

.plan-equivalent {
  font-size: 11px;
  color: #8ebfd3;
  min-height: 16px;
  margin-bottom: 14px;
}

.plan-desc {
  font-size: 13px;
  color: #8f9aa8;
  line-height: 1.55;
  min-height: 42px;
  margin-bottom: 16px;
}

.plan-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
  min-height: 152px;
  padding: 0;
  margin: 0;
}

.plan-features li {
  font-size: 13px;
  color: #b7c0cc;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  line-height: 1.45;
}

.plan-features li::before {
  content: "✓";
  color: #00d4ff;
  font-weight: 800;
  font-size: 12px;
  line-height: 1.45;
}

.btn {
  margin-top: 18px;
  width: 100%;
  padding: 12px;
  border-radius: 14px;
  border: none;
  font-size: 13px;
  font-weight: 800;
  transition: all 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.btn-primary {
  background: linear-gradient(135deg, #00d4ff, #0ee6ff);
  color: #02141d;
}

.btn-primary:hover {
  filter: brightness(1.04);
}

.btn-outline {
  background: transparent;
  border: 1px solid #26303d;
  color: #b8c1cd;
}

.btn-outline:hover {
  border-color: #00d4ff55;
  color: #eef6fb;
}

.btn:disabled,
.primary-button:disabled,
.secondary-button:disabled,
.destructive-button:disabled,
.compact-button:disabled,
.dock-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  filter: none;
}

.settings-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
  text-align: left;
}

.settings-item:last-child {
  border-bottom: 0;
}

.option-group {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-group + .option-group {
  margin-top: 16px;
}

.option-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.option-button {
  min-width: 88px;
  justify-content: center;
  text-align: center;
}

.option-button.is-active {
  background: rgba(0, 212, 255, 0.12);
  border-color: rgba(120, 218, 255, 0.22);
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(120, 218, 255, 0.16);
}

.support-grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.ticket-item {
  grid-template-columns: 78px minmax(0, 1fr);
  text-align: left;
}

.ticket-item.is-active {
  border-color: rgba(120, 218, 255, 0.22);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.1), rgba(255, 255, 255, 0.04));
}

.ticket-thread {
  margin-bottom: 14px;
}

.ticket-message-bubble {
  width: fit-content;
}

.ticket-message.is-admin .ticket-message-bubble {
  background: rgba(255, 255, 255, 0.04);
}

.reply-form {
  gap: 12px;
}

.reply-form .text-area {
  min-height: 110px;
}

.bottom-nav {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 10px calc(10px + env(safe-area-inset-bottom));
  border-radius: 28px;
  border: 1px solid rgba(120, 168, 202, 0.16);
  background: rgba(8, 12, 18, 0.84);
  backdrop-filter: blur(28px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 18px 32px rgba(0, 0, 0, 0.28);
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 0;
  padding: 10px 4px;
  border-radius: 18px;
  color: var(--soft);
  transition: transform 160ms ease, color 160ms ease, background 160ms ease;
}

.nav-item span {
  min-width: 0;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.nav-item::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: 16px;
  box-shadow: 0 0 0 rgba(0, 212, 255, 0);
  transition: box-shadow 180ms ease, background 180ms ease;
}

.nav-item.is-active {
  color: var(--text);
  transform: translateY(-1px);
}

.nav-item.is-active::after {
  background: rgba(0, 212, 255, 0.08);
  box-shadow: 0 0 20px rgba(0, 212, 255, 0.12), inset 0 0 0 1px rgba(120, 218, 255, 0.14);
}

.nav-item > * {
  position: relative;
  z-index: 1;
}

.shell-root[data-mode="guest"] .bottom-nav,
.shell-root[data-lock="onboarding"] .bottom-nav {
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, 20px, 0);
  pointer-events: none;
}

.shell-root[data-mode="guest"] .screen,
.shell-root[data-lock="onboarding"] .screen {
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
}

.shell-root[data-signal="muted"] #signalCanvas {
  opacity: 0.45;
}

.shell-root[data-signal="muted"] .signal-grid {
  opacity: 0.08;
}

.shell-root[data-signal="muted"] .signal-orb {
  opacity: 0.16;
}

.shell-root[data-signal="off"] #signalCanvas,
.shell-root[data-signal="off"] .signal-grid,
.shell-root[data-signal="off"] .signal-orb {
  opacity: 0;
}

.shell-root[data-motion="reduced"] *,
.shell-root[data-motion="reduced"] *::before,
.shell-root[data-motion="reduced"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
  scroll-behavior: auto !important;
}

.shell-root.is-ready .screen.is-active .panel {
  animation: riseIn 360ms ease both;
}

.shell-root.is-ready .screen.is-active .panel:nth-child(2) {
  animation-delay: 50ms;
}

.shell-root.is-ready .screen.is-active .panel:nth-child(3) {
  animation-delay: 90ms;
}

.shell-toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 16px);
  z-index: 8;
  width: min(420px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: 18px;
  border: 1px solid rgba(120, 218, 255, 0.18);
  background: rgba(8, 12, 18, 0.92);
  backdrop-filter: blur(24px);
  box-shadow: var(--shadow);
  color: var(--text);
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.shell-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.shell-toast.is-success {
  border-color: rgba(135, 240, 205, 0.24);
}

.shell-toast.is-error {
  border-color: rgba(255, 141, 161, 0.24);
}

.shell-toast.is-info {
  border-color: rgba(120, 218, 255, 0.24);
}

@media (min-width: 700px) {
  .shell-root {
    padding-left: 22px;
    padding-right: 22px;
  }

  .app-topbar {
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
  }

  .topbar-meta {
    justify-content: flex-end;
  }

  .responsive-grid,
  .settings-groups,
  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .settings-groups .settings-group:last-child {
    grid-column: 1 / -1;
  }

  .stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .auth-choice-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .shell-root {
    padding-top: max(24px, env(safe-area-inset-top));
    gap: 18px;
  }

  .screen {
    padding-right: 6px;
    padding-left: 6px;
  }

  .hero-panel {
    padding: 28px;
  }

  .game-grid,
  .plan-grid,
  .route-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .support-thread-panel {
    min-height: 420px;
  }
}

@media (max-width: 699px) {
  .field-grid.two-up,
  .route-grid,
  .plan-summary-panel .route-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 420px) {
  .shell-root {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .panel {
    padding: 16px;
    border-radius: 24px;
  }

  .hero-metrics,
  .quick-actions,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .status-line {
    margin-left: 0;
  }

  .thread-chip {
    min-width: 82vw;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.55;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes bootSweep {
  0% {
    transform: translateX(-120%);
    opacity: 0.45;
  }
  55% {
    opacity: 1;
  }
  100% {
    transform: translateX(340%);
    opacity: 0.55;
  }
}

body {
  font-family: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell-root {
  width: min(100%, 1160px);
  padding-top: calc(18px + env(safe-area-inset-top));
  gap: 18px;
}

.shell-overlay {
  position: fixed;
  inset: 0;
  z-index: 7;
  background: rgba(2, 4, 8, 0.56);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
}

.shell-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.shell-drawer {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  z-index: 8;
  width: min(92vw, 360px);
  padding:
    calc(18px + env(safe-area-inset-top))
    14px
    calc(18px + env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
  transform: translateX(-108%);
  opacity: 0;
  transition: transform 240ms ease, opacity 240ms ease;
  pointer-events: none;
}

.shell-drawer.is-open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-frame {
  height: 100%;
  overflow-y: auto;
  border-radius: 28px;
  border: 1px solid rgba(120, 218, 255, 0.16);
  background: linear-gradient(180deg, rgba(11, 15, 22, 0.96), rgba(7, 10, 15, 0.92));
  backdrop-filter: blur(28px);
  box-shadow: 0 36px 84px rgba(0, 0, 0, 0.46);
  padding: 18px;
}

.drawer-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(120, 168, 202, 0.12);
}

.drawer-label,
.drawer-nav-copy {
  margin: 0;
  color: var(--soft);
  font-family: "Space Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.drawer-mark {
  margin-top: 8px;
  color: var(--text);
  font-family: "Space Mono", monospace;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-indent: 0.34em;
}

.drawer-close,
.menu-button {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(120, 218, 255, 0.18);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease;
}

.drawer-close:hover,
.menu-button:hover {
  transform: translateY(-1px);
  border-color: rgba(120, 218, 255, 0.28);
  background: rgba(0, 212, 255, 0.08);
}

.drawer-close svg,
.menu-button svg {
  width: 20px;
  height: 20px;
}

.drawer-nav {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.drawer-nav-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  min-height: 64px;
  padding: 14px 16px;
  border-radius: 20px;
  border: 1px solid rgba(120, 168, 202, 0.12);
  background: rgba(255, 255, 255, 0.02);
  color: var(--muted);
  text-align: left;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.drawer-nav-item:hover,
.drawer-nav-item.is-active {
  color: var(--text);
  border-color: rgba(120, 218, 255, 0.28);
  background: linear-gradient(180deg, rgba(0, 212, 255, 0.12), rgba(255, 255, 255, 0.04));
  transform: translateY(-1px);
}

.drawer-nav-label {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0;
}

.topbar-primary {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.brand-mark {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  text-indent: 0.34em;
}

.brand-copy .eyebrow {
  color: var(--soft);
}

.topbar-meta {
  justify-content: flex-end;
}

.status-pill,
.operative-chip {
  background: rgba(9, 13, 19, 0.68);
  border-color: rgba(120, 218, 255, 0.18);
}

.status-line {
  margin-left: 0;
}

.public-screen .screen-stack {
  width: min(100%, 720px);
}

.welcome-hero {
  padding: 30px 28px;
  text-align: center;
}

.welcome-hero .panel-kicker {
  color: var(--cyan-soft);
}

.welcome-hero h2 {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  line-height: 0.96;
  margin-top: 10px;
}

.welcome-hero p {
  margin: 16px auto 0;
  max-width: 28ch;
  font-size: 1rem;
}

.welcome-choice-grid {
  gap: 18px;
}

.auth-choice {
  gap: 18px;
  padding: 22px 20px;
  min-height: 230px;
  border-color: rgba(120, 218, 255, 0.18);
  background:
    linear-gradient(180deg, rgba(13, 17, 23, 0.94), rgba(10, 14, 20, 0.96));
  box-shadow:
    inset 0 0 0 1px rgba(120, 218, 255, 0.08),
    0 18px 34px rgba(0, 0, 0, 0.28);
}

.auth-choice::after {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(80% 60% at 50% 0%, rgba(0, 212, 255, 0.16), transparent 64%);
  opacity: 0;
  transition: opacity 200ms ease;
}

.auth-choice:hover {
  transform: translateY(-2px);
  border-color: rgba(120, 218, 255, 0.32);
  box-shadow:
    inset 0 0 0 1px rgba(120, 218, 255, 0.1),
    0 22px 40px rgba(0, 0, 0, 0.34),
    0 0 32px rgba(0, 212, 255, 0.08);
}

.auth-choice:hover::after {
  opacity: 1;
}

.auth-choice h3 {
  font-size: 1.72rem;
  line-height: 1.02;
}

.auth-choice .panel-kicker {
  color: var(--cyan-soft);
}

.auth-choice p {
  color: var(--muted);
}

.auth-choice .primary-button,
.auth-choice .secondary-button {
  margin-top: auto;
}

.primary-button,
.button-link {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.96), rgba(109, 196, 255, 0.9));
  color: #03121a;
  box-shadow: 0 12px 28px rgba(0, 212, 255, 0.18);
}

.secondary-button,
.compact-button,
.option-button,
.cycle-button,
.quick-action {
  border-color: rgba(120, 218, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}

.panel {
  border-color: rgba(120, 168, 202, 0.16);
  background: linear-gradient(180deg, rgba(12, 17, 24, 0.88), rgba(8, 12, 18, 0.8));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03), 0 22px 50px rgba(0, 0, 0, 0.34);
}

.panel::before {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.04), transparent 42%);
}

.hero-panel::after,
.featured-game-panel::after,
.plans-hero::after,
.settings-hero::after,
.auth-hero::after {
  width: 220px;
  height: 220px;
  background: radial-gradient(circle, rgba(0, 212, 255, 0.24), transparent 72%);
}

.bottom-nav {
  display: none !important;
}

.screen {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.shell-root[data-mode="guest"] .screen,
.shell-root[data-lock="onboarding"] .screen {
  padding-bottom: calc(18px + env(safe-area-inset-bottom));
}

.shell-toast {
  bottom: calc(26px + env(safe-area-inset-bottom));
}

@media (max-width: 860px) {
  .app-topbar {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .topbar-meta {
    width: 100%;
    justify-content: flex-start;
  }

  .status-line {
    width: 100%;
  }
}

@media (max-width: 699px) {
  .shell-root {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }

  .welcome-hero {
    padding: 26px 20px;
  }

  .welcome-hero h2 {
    font-size: clamp(2rem, 13vw, 3.4rem);
  }

  .auth-choice {
    min-height: 0;
  }
}
