/* PROJECT S beta - base layer: pearl light, prism atmosphere */
*,
*::before,
*::after {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: var(--ink-0);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink-0);
  color: var(--paper);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* global hazy prism wash: a single soft light field across the whole page */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background: linear-gradient(115deg, rgba(184,160,240,0.11) 0%, rgba(180,216,248,0.07) 36%, rgba(248,216,232,0.09) 66%, rgba(184,160,240,0.07) 100%);
  transition: opacity 0.6s ease;
}

/* pixel lattice removed from the global layer; login uses large mirror crystals */
body::after {
  content: none;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
}

button {
  border: 0;
  background: none;
  cursor: pointer;
  padding: 0;
}

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

canvas {
  display: block;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.18;
  font-weight: 700;
  letter-spacing: 0;
}

::selection {
  background: var(--signal);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: 6px;
}

#app {
  min-height: 100vh;
}

.view {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 20px 20px calc(var(--tabbar-h) + 28px);
}

.page {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.page-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.page-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-title {
  font-size: 30px;
  max-width: 680px;
}

.page-sub {
  color: var(--dim);
  max-width: 620px;
  font-size: 15px;
}

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

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.section-title {
  font-size: 18px;
}

.section-note {
  color: var(--muted);
  font-size: 12px;
  font-family: var(--font-mono);
}

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

.dim {
  color: var(--dim);
}

.mono {
  font-family: var(--font-mono);
}

.accent {
  color: var(--signal);
}

.inline-link {
  color: var(--signal);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.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;
}

/* branded empty state */
.empty-state {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 44px 24px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  color: var(--dim);
  background:
    radial-gradient(120% 90% at 50% 0%, var(--signal-soft), transparent 60%),
    var(--ink-1);
  overflow: hidden;
}

.empty-state::before {
  content: "";
  position: absolute;
  top: 18px;
  left: 50%;
  width: 34px;
  height: 34px;
  transform: translateX(-50%) rotate(45deg);
  background: linear-gradient(135deg, var(--prism-lilac), var(--prism-cyan));
  opacity: 0.5;
  border-radius: 6px;
}

.empty-state > * {
  position: relative;
}

.empty-state .icon {
  color: var(--signal);
}

.empty-state strong {
  color: var(--paper);
  font-size: 16px;
  font-family: var(--font-display);
}

.grid-2 {
  display: grid;
  gap: 16px;
}

.grid-3 {
  display: grid;
  gap: 16px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.divider {
  height: 1px;
  background: var(--line);
  border: 0;
  margin: 0;
}

@media (min-width: 720px) {
  .view {
    padding-top: 28px;
    padding-left: 28px;
    padding-right: 28px;
  }

  .page-title {
    font-size: 34px;
  }

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

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

@media (min-width: 960px) {
  .view {
    padding: 32px 40px 64px;
    max-width: 1240px;
  }
}

body[data-immersive="true"] .view {
  max-width: 1280px;
  padding-top: 24px;
}

@media (min-width: 960px) {
  body[data-immersive="true"] .view {
    padding-top: 28px;
  }
}

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