@import url('https://fonts.googleapis.com/css2?family=Heebo:wght@300;400;500;600;700;800&display=swap');

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-family);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: var(--font-size-base);
  line-height: 1.65;
  min-height: 100vh;
  /* Guards against the classic phone-width bug where one slightly-too-wide
     element (a decorative blob, a wide table, a long unbroken string) forces
     the whole page to scroll sideways - every legitimate horizontal scroller
     (tables, code blocks) already gets its own explicit overflow-x:auto
     wrapper, so this only ever clips accidents. */
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
  display: block;
}

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 var(--space-5);
}

/* Scroll-reveal - elements start faded/offset and settle into place once
   they enter the viewport (see public/js/shared/reveal.js). The JS falls
   back to adding .is-visible immediately when IntersectionObserver or
   motion isn't available, so this must never be the only way content
   becomes visible. */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-d1 {
  transition-delay: 0.08s;
}

.reveal-d2 {
  transition-delay: 0.16s;
}

.reveal-d3 {
  transition-delay: 0.24s;
}

.reveal-d4 {
  transition-delay: 0.32s;
}

.reveal-d5 {
  transition-delay: 0.4s;
}

@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 0.85rem 1.6rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: var(--font-size-sm);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  white-space: nowrap;
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: var(--shadow-glow);
}

.btn-primary:hover {
  box-shadow: 0 0 0 1px rgba(108, 99, 255, .5), 0 0 55px rgba(108, 99, 255, .35);
  transform: translateY(-1px);
}

.btn-ghost {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-ghost:hover {
  border-color: var(--color-primary-light);
  background: rgba(108, 99, 255, 0.08);
}

.btn-sm {
  padding: 0.55rem 1.1rem;
  font-size: var(--font-size-xs);
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: rgba(255, 93, 115, 0.12);
  color: var(--color-danger);
  border-color: rgba(255, 93, 115, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 93, 115, 0.2);
}

/* Top navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.78);
  border-bottom: 1px solid var(--color-border);
}

/* A thin brand-gradient hairline above the header - the kind of small,
   deliberate signature detail that reads as "considered brand," not just
   "a website." */
.site-header::before {
  content: '';
  display: block;
  height: 3px;
  background: var(--gradient-brand);
}

.site-header .nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-4) var(--space-5);
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: var(--font-size-lg);
}

.brand .logo-mark {
  width: 30px;
  height: 30px;
  display: block;
  filter: drop-shadow(0 0 10px rgba(108, 99, 255, 0.35));
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.nav-links a:hover {
  color: var(--color-text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

/* Phone widths: the feature/how/pricing links wrap onto their own centered
   row below the brand + auth actions, instead of squeezing everything (or
   overflowing) into one cramped line. No hamburger/JS needed here - there
   are only 3 links, so a wrapped second row still reads cleanly. */
@media (max-width: 640px) {
  .site-header .nav-inner {
    flex-wrap: wrap;
    row-gap: var(--space-3);
    justify-content: center;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: center;
    gap: var(--space-5);
  }

  .nav-actions {
    gap: var(--space-2);
  }
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 38px;
  height: 38px;
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  transition: color var(--transition-fast), border-color var(--transition-fast);
  flex-shrink: 0;
}

.icon-btn:hover {
  color: var(--color-text);
  border-color: var(--color-primary-light);
}

.icon-btn.lang-switch {
  width: auto;
  padding: 0 12px;
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.icon-btn svg {
  display: block;
}

.nav-icon {
  vertical-align: middle;
  margin-inline-end: 4px;
}

.sidebar-toggles {
  display: flex;
  gap: var(--space-2);
}

/* Generic <details>-based dropdown menu - anything that has (or might grow)
   more options/actions than comfortably fit inline collapses into this
   instead of overflowing its container. Used by the language switcher and
   the dashboard app-card's "more actions" menu; reach for it again rather
   than hand-rolling another overflow row. list-style/marker resets strip
   the native disclosure triangle in both Chromium and Firefox. */
.dropdown {
  position: relative;
  list-style: none;
}

.dropdown>summary {
  list-style: none;
  cursor: pointer;
}

.dropdown>summary::-webkit-details-marker {
  display: none;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 6px);
  inset-inline-end: 0;
  z-index: 60;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 4px;
  min-width: 150px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-menu a,
.dropdown-menu button {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  box-sizing: border-box;
  text-align: start;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
  background: var(--color-surface-alt);
  color: var(--color-text);
}

.dropdown-menu a.active {
  color: var(--color-primary-light);
  font-weight: 700;
}

.dropdown-menu button.danger {
  color: var(--color-danger);
}

.dropdown-menu button.danger:hover {
  background: rgba(255, 93, 115, 0.12);
}

.dropdown-menu form {
  margin: 0;
  width: 100%;
}

.btn-icon {
  padding: 0.5rem 0.7rem;
}

/* Hero */
.hero {
  background: var(--gradient-hero);
  padding: var(--space-12) 0 var(--space-10);
  text-align: center;
  overflow: hidden;
  position: relative;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-sm);
}

.eyebrow-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex-shrink: 0;
  animation: pulse-dot 2.2s ease-in-out infinite;
}

@keyframes pulse-dot {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.5;
    transform: scale(0.8);
  }
}

@media (prefers-reduced-motion: reduce) {
  .eyebrow-dot {
    animation: none;
  }
}

.hero h1 {
  font-size: var(--font-size-4xl);
  font-weight: 800;
  margin: 0 0 var(--space-5);
  line-height: 1.15;
  max-width: 900px;
  margin-inline: auto;
}

.hero h1 span {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  max-width: 640px;
  margin: 0 auto var(--space-8);
}

.hero-actions {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  flex-wrap: wrap;
}

.hero-mock {
  position: relative;
  margin: var(--space-10) auto 0;
  max-width: 980px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  box-shadow: var(--shadow-lg);
  padding: var(--space-3);
}

/* Soft brand-colored aura behind the hero mockup - echoes the logo's own
   blue-to-violet glow (see .preloader-logo's drop-shadow) instead of the
   mockup just sitting flat on the page. */
.hero-mock::before {
  content: '';
  position: absolute;
  inset: -10%;
  z-index: -1;
  background: var(--gradient-brand);
  filter: blur(70px);
  opacity: 0.28;
  border-radius: var(--radius-lg);
}

.hero-mock-inner {
  border-radius: var(--radius-md);
  background: var(--color-bg-alt);
  aspect-ratio: 16/8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-6);
  padding: var(--space-6);
}

/* Floating feature chips - glass pills anchored to the hero mockup corners,
   pulled from real copy elsewhere on the page (no new translation strings)
   so the hero reads as "here's what's inside" at a glance. Hidden below the
   width where the mockup itself shrinks too much to anchor them cleanly. */
.hero-float-chip {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  padding: 10px 16px;
  font-size: var(--font-size-xs);
  font-weight: 700;
  color: var(--color-text);
  box-shadow: var(--shadow-lg);
  animation: float-y 4.5s ease-in-out infinite;
}

.hero-float-chip .chip-icon {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.hero-float-chip-a {
  top: -6%;
  inset-inline-start: 2%;
}

.hero-float-chip-b {
  bottom: -8%;
  inset-inline-end: 4%;
  animation-delay: -2.3s;
}

@media (max-width: 860px) {
  .hero-float-chip {
    display: none;
  }
}

@keyframes float-y {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-10px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-float-chip {
    animation: none;
  }
}

.phone-mock {
  width: 190px;
  height: 380px;
  border-radius: 32px;
  background: var(--color-surface);
  border: 6px solid var(--color-bg);
  box-shadow: var(--shadow-md);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.phone-mock .pm-bar {
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
  width: 60%;
}

.phone-mock .pm-block {
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
}

.phone-mock .pm-block.small {
  height: 22px;
  width: 70%;
}

.phone-mock .pm-btn {
  margin-top: auto;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gradient-brand);
}

/* Richer mockup content - small "screens" that read as an actual app
   instead of gray placeholder bars, without pulling in real screenshots. */
.pm-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.pm-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--gradient-brand);
  flex-shrink: 0;
}

.pm-head-lines {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
  min-width: 0;
}

.pm-head-lines span {
  display: block;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-surface-alt);
}

.pm-head-lines span:first-child {
  width: 70%;
}

.pm-head-lines span:last-child {
  width: 45%;
  opacity: 0.6;
}

.pm-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
}

.pm-row-icon {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.pm-row-icon svg {
  width: 12px;
  height: 12px;
}

.pm-row-lines {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.pm-row-lines span {
  display: block;
  height: 5px;
  border-radius: var(--radius-full);
  background: var(--color-border);
}

.pm-row-lines span:last-child {
  width: 55%;
}

.pm-row-check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-success);
  flex-shrink: 0;
  opacity: 0.85;
}

.pm-bubble {
  max-width: 78%;
  padding: 7px 10px;
  border-radius: 12px;
  font-size: 9px;
  line-height: 1.4;
}

.pm-bubble-in {
  align-self: flex-start;
  background: var(--color-surface-alt);
  border-end-start-radius: 3px;
}

.pm-bubble-out {
  align-self: flex-end;
  background: var(--gradient-brand);
  color: #fff;
  border-end-end-radius: 3px;
}

.pm-bubble span {
  display: block;
  height: 5px;
  border-radius: var(--radius-full);
  background: currentColor;
  opacity: 0.35;
  margin: 3px 0;
}

.pm-bubble span:last-child {
  width: 60%;
}

.pm-stat-ring {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  margin: 4px auto 6px;
  background: conic-gradient(var(--color-primary) 0deg 260deg, var(--color-border) 260deg 360deg);
  display: flex;
  align-items: center;
  justify-content: center;
}

.pm-stat-ring::after {
  content: '72%';
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: var(--color-text);
}

.pm-stat-tiles {
  display: flex;
  gap: 6px;
}

.pm-stat-tile {
  flex: 1;
  border-radius: var(--radius-sm);
  background: var(--color-surface-alt);
  padding: 6px;
  text-align: center;
}

.pm-stat-tile b {
  display: block;
  font-size: 13px;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pm-stat-tile i {
  font-style: normal;
  font-size: 8px;
  color: var(--color-text-dim);
}

/* Stats / trust bar */
.stats-bar {
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background: var(--color-surface);
}

.stats-bar-inner {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-6);
  padding: var(--space-8) 0;
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  inset-inline-end: calc(var(--space-6) / -2 - 1px);
  top: 10%;
  bottom: 10%;
  width: 1px;
  background: var(--color-border);
}

.stat-icon {
  width: 38px;
  height: 38px;
  margin: 0 auto var(--space-2);
  border-radius: var(--radius-sm);
  background: rgba(108, 99, 255, 0.1);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-value {
  font-size: var(--font-size-2xl);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  margin-top: var(--space-1);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

@media (max-width: 860px) {
  .stats-bar-inner {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-item:nth-child(2)::after {
    display: none;
  }
}

/* Sections */
.section {
  padding: var(--space-10) 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto var(--space-8);
}

.section-head .tag {
  color: var(--color-primary-light);
  font-weight: 700;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-head h2 {
  font-size: var(--font-size-2xl);
  margin: var(--space-2) 0 var(--space-3);
  font-weight: 800;
}

.section-head p {
  color: var(--color-text-muted);
}

.grid {
  display: grid;
  gap: var(--space-5);
}

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

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

@media (max-width: 860px) {

  .grid-3,
  .grid-2 {
    grid-template-columns: 1fr;
  }

  .hero h1 {
    font-size: var(--font-size-3xl);
  }

  .hero-mock-inner {
    flex-direction: column;
  }
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md), 0 0 0 1px rgba(108, 99, 255, 0.08);
  border-color: var(--color-primary-light);
}

.card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  margin-bottom: var(--space-4);
  box-shadow: 0 8px 20px rgba(108, 99, 255, 0.25);
  transition: transform var(--transition-base);
}

.card:hover .icon {
  transform: scale(1.08) rotate(-4deg);
}

.card h3 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-lg);
}

.card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.steps {
  counter-reset: step;
}

.step {
  display: flex;
  gap: var(--space-4);
  align-items: flex-start;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}

.step:last-child {
  border-bottom: none;
}

.step .num {
  counter-increment: step;
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: #fff;
  box-shadow: 0 6px 16px rgba(108, 99, 255, 0.3);
}

.step h4 {
  margin: 0 0 var(--space-1);
}

.step p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.cta-band {
  position: relative;
  background: var(--gradient-brand);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  text-align: center;
  color: #fff;
  margin: var(--space-10) 0;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(108, 99, 255, 0.3);
}

/* Faint oversized logo watermark + soft glow blobs - ties the closing CTA
   back to the brand mark without competing with the headline text. */
.cta-band::before {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-end: -60px;
  width: 260px;
  height: 260px;
  transform: translateY(-50%);
  background: url('/a-logo.svg') center / contain no-repeat;
  opacity: 0.14;
  filter: brightness(0) invert(1);
  pointer-events: none;
}

.cta-band::after {
  content: '';
  position: absolute;
  top: -40%;
  inset-inline-start: -10%;
  width: 60%;
  height: 180%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 60%);
  pointer-events: none;
}

.cta-band h2,
.cta-band p,
.cta-band .btn {
  position: relative;
  z-index: 1;
}

.cta-band h2 {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-2xl);
}

.cta-band p {
  opacity: 0.9;
  margin: 0 0 var(--space-6);
}

.cta-band .btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.4);
  color: #fff;
}

/* Games showcase band - a full-bleed dark section (same edge-to-edge
   pattern as .stats-bar), deliberately echoing Game Studio's own neon-on-
   charcoal identity (see game-studio.css's .game-studio-body) instead of
   the rest of the site's light brand theme - a visual cue that this is a
   genuinely different mode of the same builder, not just another feature
   card. Colors are defined locally (not the shared --color-* tokens) so
   nothing outside this one section is affected, same reasoning as
   game-studio.css's own scoped override. */
.games-band {
  --games-cyan: #00e0ff;
  --games-magenta: #ff2ee0;
  position: relative;
  background:
    radial-gradient(circle at 12% 10%, rgba(0, 224, 255, 0.16), transparent 42%),
    radial-gradient(circle at 88% 15%, rgba(255, 46, 224, 0.14), transparent 42%),
    #0a0a16;
  color: #f1f0ff;
  overflow: hidden;
}

.games-band .section-head .tag {
  color: var(--games-cyan);
}

.games-band .section-head h2 {
  color: #fff;
}

.games-band .section-head p {
  color: #a6a3d6;
}

.game-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(0, 224, 255, 0.18);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.game-card:hover {
  transform: translateY(-4px);
  border-color: var(--games-cyan);
}

.game-card .icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--games-cyan) 0%, #7b5cff 55%, var(--games-magenta) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0a0a16;
  margin-bottom: var(--space-4);
  box-shadow: 0 0 24px rgba(0, 224, 255, 0.35);
}

.game-card h3 {
  margin: 0 0 var(--space-2);
  color: #fff;
  font-size: var(--font-size-lg);
}

.game-card p {
  margin: 0;
  color: #a6a3d6;
  font-size: var(--font-size-sm);
}

.games-template-chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
  margin: var(--space-8) 0 0;
}

.games-chip {
  border: 1px solid rgba(0, 224, 255, 0.3);
  background: rgba(0, 224, 255, 0.08);
  color: #d7fbff;
  font-size: var(--font-size-xs);
  font-weight: 600;
  padding: var(--space-2) var(--space-4);
  border-radius: var(--radius-full);
  white-space: nowrap;
}

.games-band-cta {
  text-align: center;
  margin-top: var(--space-8);
}

.btn-games {
  background: linear-gradient(135deg, var(--games-cyan) 0%, #7b5cff 55%, var(--games-magenta) 100%);
  color: #0a0a16;
  font-weight: 800;
  border: none;
  box-shadow: 0 0 30px rgba(0, 224, 255, 0.3);
}

.btn-games:hover {
  filter: brightness(1.08);
}

/* Pricing */
.price-card {
  position: relative;
  text-align: center;
}

.price-card.featured {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-glow);
}

.price-card .badge {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--gradient-brand);
  color: #fff;
  font-size: var(--font-size-xs);
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-full);
  font-weight: 700;
}

.price-card .amount {
  font-size: var(--font-size-3xl);
  font-weight: 800;
  margin: var(--space-4) 0;
}

.price-card .amount span {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-weight: 400;
}

.price-card ul {
  list-style: none;
  padding: 0;
  margin: var(--space-5) 0;
  text-align: start;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.price-card li {
  padding: var(--space-2) 0;
  display: flex;
  gap: var(--space-2);
  align-items: center;
}

.price-card li::before {
  content: '✓';
  color: var(--color-accent);
  font-weight: 800;
}

/* The one "con" line on the free plan (ads) - same list marker language,
   but a warm/neutral tone instead of the accent green "yes" checks so it
   doesn't read as a benefit. */
.price-card li.price-card-con {
  color: var(--color-text-dim);
}

.price-card li.price-card-con::before {
  content: '·';
  color: var(--color-warning);
  font-size: 1.4em;
  line-height: 0;
}

/* FAQ (pricing page) */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.faq-item {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 700;
  font-size: var(--font-size-base);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: '+';
  font-size: 1.3em;
  color: var(--color-primary-light);
  flex-shrink: 0;
  transition: transform var(--transition-fast);
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: var(--space-3) 0 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
}

.plan-request summary {
  cursor: pointer;
  list-style: none;
}

.plan-request summary::-webkit-details-marker {
  display: none;
}

.plan-request-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
  text-align: start;
}

.plan-request-form textarea {
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-sm);
  resize: vertical;
}

.price-custom-note {
  text-align: center;
  margin-top: var(--space-6);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.price-custom-note .plan-request {
  display: inline-block;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: var(--space-10) 0 0;
  color: var(--color-text-dim);
  font-size: var(--font-size-sm);
  background: var(--color-surface);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: var(--space-8);
  padding-bottom: var(--space-8);
}

.footer-brand .brand {
  margin-bottom: var(--space-3);
}

.footer-tagline {
  max-width: 340px;
  margin: 0;
  line-height: 1.6;
}

.footer-col-title {
  color: var(--color-text);
  font-weight: 700;
  font-size: var(--font-size-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: var(--space-3);
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer-col a:hover {
  color: var(--color-text);
}

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding: var(--space-5) 0;
  font-size: var(--font-size-xs);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: space-between;
}

.footer-madeby {
  color: var(--color-text-muted);
}

.footer-madeby a {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}

@media (max-width: 720px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Auth pages */
.auth-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gradient-hero);
  padding: var(--space-6);
}

.auth-card {
  position: relative;
  width: 100%;
  max-width: 420px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  box-shadow: var(--shadow-lg);
}

.auth-card::before {
  content: '';
  position: absolute;
  inset: -8%;
  z-index: -1;
  background: var(--gradient-brand);
  filter: blur(60px);
  opacity: 0.22;
  border-radius: var(--radius-lg);
}

.auth-logo {
  display: flex;
  justify-content: center;
  margin-bottom: var(--space-4);
}

.auth-logo img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 0 12px rgba(108, 99, 255, 0.35));
}

.auth-card h1 {
  font-size: var(--font-size-xl);
  margin: 0 0 var(--space-2);
  text-align: center;
}

.auth-card .sub {
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-6);
}

.field {
  margin-bottom: var(--space-4);
}

.field label {
  display: block;
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
  font-weight: 600;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-family: inherit;
  font-size: var(--font-size-sm);
  transition: border-color var(--transition-fast);
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--color-primary);
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.auth-foot {
  text-align: center;
  margin-top: var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.alert {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.alert-error {
  background: rgba(255, 93, 115, 0.12);
  color: var(--color-danger);
  border: 1px solid rgba(255, 93, 115, 0.3);
}

.alert-success {
  background: rgba(46, 204, 113, 0.12);
  color: var(--color-success);
  border: 1px solid rgba(46, 204, 113, 0.3);
}

/* Dashboard */
.dash-shell {
  display: flex;
  min-height: 100vh;
}

.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--color-surface);
  border-inline-end: 1px solid var(--color-border);
  padding: var(--space-6) var(--space-4);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.dash-main {
  flex: 1;
  padding: var(--space-6) var(--space-8);
  max-width: calc(100% - 240px);
}

.dash-nav {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.dash-nav a {
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.dash-nav a:hover,
.dash-nav a.active {
  background: rgba(108, 99, 255, 0.12);
  color: var(--color-text);
}

.dash-mobile-topbar {
  display: none;
}

.dash-bottom-nav {
  display: none;
}

/* Below this width the fixed 240px sidebar would leave almost nothing for
   .dash-main, so it becomes an off-canvas drawer instead - same
   toggle-button + backdrop + .open pattern the builder already uses for
   its own mobile panels (see builder.css / builder-main.js), just applied
   to the dashboard/admin shell here. It's paired with two ALWAYS-visible
   bars (not just a floating toggle button) so the page reads as "this is
   AppNoy, here's where you are" without opening anything first: a slim
   top bar for branding + the drawer toggle, and a bottom tab bar for the
   handful of destinations worth one-tap access. */
@media (max-width: 860px) {
  .dash-mobile-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    position: fixed;
    top: 0;
    inset-inline: 0;
    z-index: 45;
    padding: var(--space-3) var(--space-4);
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    box-shadow: 0 2px 12px rgba(28, 26, 46, 0.05);
  }

  .dash-mobile-topbar .brand {
    font-size: var(--font-size-base);
  }

  .dash-mobile-topbar .icon-btn {
    transition: background var(--transition-fast), transform var(--transition-fast);
  }

  .dash-mobile-topbar .icon-btn:active {
    transform: scale(0.92);
  }

  /* The permanently-docked desktop sidebar has no place on phone widths -
     its content is duplicated (via dash-nav-body.ejs) into the "..."
     dropdown menu above instead of this same element becoming an
     off-canvas drawer, so there's no slide-in panel or backdrop to manage. */
  .dash-sidebar {
    display: none;
  }

  .dash-main {
    max-width: 100%;
    padding-top: calc(var(--space-10) + var(--space-4));
    padding-bottom: calc(72px + var(--space-4));
  }

  /* The mobile "..." menu - same anchored-dropdown toggle behavior (and the
     same public/js/shared/topbar-more.js) as the builder topbar's own
     overflow menu, but deliberately its OWN class rather than reusing
     .dropdown-menu: that class's "a, button { width:100% }" flat-list
     styling (meant for a handful of stacked action buttons) would otherwise
     bleed into this panel's much richer content - a real nav, a language
     switcher, the storage bar, all of which already have their own look -
     and mangle it. Self-contained chrome here instead of inheriting
     .dropdown-menu's, plus its own internal scroll (max-height+overflow-y)
     for when that content is taller than the screen. */
  .dash-mobile-menu {
    position: relative;
  }

  .dash-mobile-menu-panel {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    inset-inline-end: 0;
    z-index: 60;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
  }

  .dash-mobile-menu-panel.open {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    width: 260px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 76px);
    overflow-y: auto;
    padding: var(--space-4);
  }

  /* Pill-highlight tab bar, not just a color swap - the active destination
     gets its own brand-tinted "chip" behind the icon (the same visual
     language as .dash-nav a.active in the "..." menu) so it reads at a
     glance instead of needing a second to notice the text turned purple. */
  .dash-bottom-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    inset-inline: 0;
    z-index: 45;
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    box-shadow: 0 -2px 16px rgba(28, 26, 46, 0.06);
    padding: 6px var(--space-2) max(6px, env(safe-area-inset-bottom));
  }

  .dash-bottom-nav a {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 2px;
    font-size: 10px;
    font-weight: 600;
    color: var(--color-text-dim);
  }

  .dash-bottom-nav a svg {
    transition: transform var(--transition-fast);
  }

  .dash-bottom-nav a .dash-tab-chip {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 24px;
    border-radius: var(--radius-full);
    transition: background var(--transition-fast);
  }

  .dash-bottom-nav a.active .dash-tab-chip {
    background: rgba(108, 99, 255, 0.14);
  }

  .dash-bottom-nav a.active {
    color: var(--color-primary);
  }

  .dash-bottom-nav a:active .dash-tab-chip {
    transform: scale(0.92);
  }

  .dash-bottom-nav a span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 100%;
  }
}

/* "Which kind of storage is this" clarity badge - local (device-only,
   never leaves the visitor's browser) vs cloud (server-side, shareable
   across the owner's apps) - shown next to the Variables modal, Data
   Tables page, and Shared Tables page headers. */
.db-kind-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border-radius: var(--radius-full);
  font-size: var(--font-size-xs);
  font-weight: 600;
  margin-inline-start: 8px;
  vertical-align: middle;
}

.db-kind-badge.local {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

.db-kind-badge.cloud {
  background: rgba(79, 168, 255, 0.15);
  color: var(--color-accent-dark);
}

.dash-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-6);
  flex-wrap: wrap;
  gap: var(--space-3);
}

.dash-header h1 {
  font-size: var(--font-size-xl);
  margin: 0;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-limit-usage {
  font-size: var(--font-size-xs);
  color: var(--color-text-dim);
  margin-top: 2px;
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.alert-banner-flat {
  background: rgba(255, 93, 115, 0.12);
  border: 1px solid rgba(255, 93, 115, 0.3);
  color: var(--color-danger);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  font-size: var(--font-size-sm);
  margin-bottom: var(--space-4);
}

.usage-widget {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}

.usage-widget .label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-2);
}

.usage-alert {
  background: rgba(255, 93, 115, 0.14);
  border: 1px solid rgba(255, 93, 115, 0.35);
  color: var(--color-danger);
  font-size: 11px;
  line-height: 1.4;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-3);
}

.usage-alert a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

/* Gallery page hero - a bigger, showier restyle of the same usage-bar/
   usage-alert markup the sidebar widget uses (see js-usage-widget in
   usage-widget.js, which drives both instances from one poll loop). */
.gallery-hero {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  margin-bottom: var(--space-5);
  box-shadow: var(--shadow-lg);
}

.gallery-hero-glow {
  position: absolute;
  inset: -50% -10% auto auto;
  width: 280px;
  height: 280px;
  background: var(--gradient-brand);
  filter: blur(70px);
  opacity: 0.3;
  border-radius: 50%;
  pointer-events: none;
}

.gallery-hero-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}

.gallery-hero-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  color: var(--color-text-muted);
}

.gallery-hero-figures {
  font-size: var(--font-size-lg);
  font-weight: 800;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.gallery-hero-bar {
  position: relative;
  height: 14px;
}

.gallery-hero-bar .usage-bar-fill {
  position: relative;
  overflow: hidden;
}

.gallery-hero-bar .usage-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  animation: gallery-shimmer 2.4s ease-in-out infinite;
}

@keyframes gallery-shimmer {
  0% {
    transform: translateX(-100%);
  }

  100% {
    transform: translateX(100%);
  }
}

.gallery-hero .usage-alert {
  position: relative;
  margin-top: var(--space-3);
  margin-bottom: 0;
}

.gallery-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.gallery-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.gallery-select {
  font-size: var(--font-size-sm);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
}

.usage-bar {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--color-bg-alt);
  overflow: hidden;
}

.usage-bar-fill {
  height: 100%;
  background: var(--gradient-brand);
  border-radius: var(--radius-full);
  transition: width var(--transition-base);
}

.usage-bar-fill.warn {
  background: linear-gradient(135deg, var(--color-warning), var(--color-danger));
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--space-5);
}

/* No overflow:hidden here (on purpose) - the "more actions" dropdown menu
   in .app-card .actions is position:absolute and needs to escape the
   card's own box instead of being clipped by it. The thumb's top corners
   get their own border-radius below instead of relying on the card
   clipping them. */
.app-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: transform var(--transition-base), border-color var(--transition-base);
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary-light);
}

.app-card .thumb {
  height: 110px;
  background: var(--gradient-brand);
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: rgba(255, 255, 255, 0.9);
}

.app-card .body {
  padding: var(--space-4);
}

.app-card h3 {
  margin: 0 0 var(--space-1);
  font-size: var(--font-size-base);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-card .meta {
  font-size: var(--font-size-xs);
  color: var(--color-text-dim);
  margin-bottom: var(--space-3);
}

.app-card .status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--font-size-xs);
  padding: 2px 10px;
  border-radius: var(--radius-full);
}

.status.live {
  background: rgba(46, 204, 113, 0.14);
  color: var(--color-success);
}

.status.draft {
  background: rgba(169, 167, 199, 0.14);
  color: var(--color-text-muted);
}

.app-card .actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.app-card .actions .dropdown {
  margin-inline-start: auto;
}

.new-app-card {
  border: 1.5px dashed var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-8) var(--space-4);
  color: var(--color-text-muted);
  cursor: pointer;
  background: transparent;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.new-app-card:hover {
  border-color: var(--color-primary);
  color: var(--color-primary-light);
}

.new-app-card .plus {
  font-size: 1.8rem;
}

.empty-state {
  text-align: center;
  padding: var(--space-10) var(--space-4);
  color: var(--color-text-muted);
}

/* Modal */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  /* Without this the modal (width:100%) sits flush against the screen
     edges on a phone - no gutter, no visible rounded corners. */
  padding: var(--space-4);
}

.modal-backdrop.open {
  display: flex;
}

.modal {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow-lg);
  max-height: calc(100vh - var(--space-8));
  overflow-y: auto;
}

.modal h3 {
  margin-top: 0;
}

.modal.wide {
  max-width: 640px;
  max-height: 82vh;
  overflow-y: auto;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-3);
  margin-top: var(--space-5);
}

@media (max-width: 480px) {
  .modal {
    padding: var(--space-4);
  }

  .modal-actions {
    flex-wrap: wrap;
  }

  .modal-actions .btn {
    flex: 1 1 auto;
  }
}

.template-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: var(--space-3);
  margin-top: var(--space-2);
}

.template-card {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  cursor: pointer;
  text-align: center;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.template-card:hover {
  border-color: var(--color-primary-light);
}

.template-card.selected {
  border-color: var(--color-primary);
  background: rgba(108, 99, 255, 0.1);
}

.template-card-thumb {
  height: 48px;
  border-radius: var(--radius-sm);
  background: var(--gradient-brand);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: var(--space-2);
}

.template-card-thumb.blank {
  background: var(--color-bg-alt);
  color: var(--color-text-muted);
}

/* Landscape option in the New App modal's orientation picker - rotates the
   same phone icon used for portrait, instead of needing a second icon. */
.template-card-thumb.rotated-icon svg {
  transform: rotate(90deg);
}

.template-card-name {
  font-size: var(--font-size-xs);
  font-weight: 700;
}

.template-card-desc {
  font-size: 10px;
  color: var(--color-text-dim);
  margin-top: 2px;
}

.template-toggle-form {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}

.template-toggle-form input {
  flex: 1;
  min-width: 0;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-bg-alt);
  color: var(--color-text);
  font-size: var(--font-size-xs);
}

.template-toggle-form .is-template-on {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.publish-qr-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  margin: var(--space-4) 0;
}

.publish-qr-wrap img {
  border-radius: var(--radius-sm);
  background: #fff;
  padding: 8px;
}

.publish-qr-caption {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  text-align: center;
  margin: 0;
}

/* Onboarding tour (see public/js/shared/onboarding.js) */
.onboarding-modal {
  max-width: 440px;
  text-align: center;
}

.onboarding-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: var(--space-4);
}

.onboarding-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-border);
  transition: background var(--transition-fast), transform var(--transition-fast);
}

.onboarding-dot.active {
  background: var(--gradient-brand);
  transform: scale(1.3);
}

.onboarding-modal h3 {
  font-size: var(--font-size-lg);
  margin: 0 0 var(--space-3);
}

.onboarding-body {
  color: var(--color-text-muted);
  line-height: 1.65;
  margin: 0;
}

.onboarding-step-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-dim);
  margin-top: var(--space-4);
}

.onboarding-actions {
  align-items: center;
  justify-content: space-between;
}

.onboarding-nav {
  display: flex;
  gap: var(--space-2);
}

/* Spotlight coachmark (see public/js/shared/coachmark.js) - points at one
   real button at a time instead of describing it in the abstract. */
.coachmark-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9996;
  background: rgba(10, 8, 30, 0.45);
}

.coachmark-spotlight {
  position: fixed;
  z-index: 9997;
  border-radius: 14px;
  box-shadow: 0 0 0 9999px rgba(10, 8, 30, 0.55);
  outline: 3px solid var(--color-primary);
  outline-offset: 2px;
  pointer-events: none;
  animation: coachmark-pulse 1.8s ease-in-out infinite;
}

@keyframes coachmark-pulse {

  0%,
  100% {
    outline-color: var(--color-primary);
  }

  50% {
    outline-color: var(--color-accent);
  }
}

@media (prefers-reduced-motion: reduce) {
  .coachmark-spotlight {
    animation: none;
  }
}

.coachmark-card {
  position: fixed;
  z-index: 9999;
  width: min(320px, calc(100vw - 28px));
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  transition: top 0.2s ease, left 0.2s ease;
}

.coachmark-card.coachmark-centered {
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%);
  width: min(400px, calc(100vw - 28px));
  text-align: center;
}

.coachmark-arrow {
  position: absolute;
  width: 16px;
  height: 16px;
  background: var(--color-surface);
  border-inline-start: 1px solid var(--color-border);
  border-top: 1px solid var(--color-border);
  transform: rotate(45deg);
}

.coachmark-arrow-up {
  top: -9px;
}

.coachmark-arrow-down {
  bottom: -9px;
  transform: rotate(225deg);
}

.coachmark-title {
  font-size: var(--font-size-base);
  margin: 0 0 var(--space-2);
}

.coachmark-body {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  line-height: 1.6;
  margin: 0;
}

.coachmark-step-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-dim);
  margin-top: var(--space-3);
}

.coachmark-card .onboarding-dots {
  justify-content: flex-start;
  margin-bottom: var(--space-3);
}

.coachmark-card.coachmark-centered .onboarding-dots {
  justify-content: center;
}

.coachmark-card .onboarding-actions {
  margin-top: var(--space-4);
}

/* Toast */
.toast-host {
  position: fixed;
  bottom: var(--space-5);
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.toast {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  color: var(--color-text);
  padding: var(--space-3) var(--space-5);
  border-radius: var(--radius-full);
  box-shadow: var(--shadow-md);
  font-size: var(--font-size-sm);
}