:root {
  --bg: var(--tg-theme-bg-color, #f2f3f5);
  --text: var(--tg-theme-text-color, #1e2126);
  --hint: var(--tg-theme-hint-color, #7c8188);
  --divider: rgba(30, 33, 38, 0.09);
  --accent: #4c6485;
  --accent-wash: color-mix(in srgb, var(--accent) 14%, white);
  --accent-ink: color-mix(in srgb, var(--accent) 65%, black);
  --font-display: "Manrope", system-ui, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-tap-highlight-color: transparent;
}

#app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: 40px;
}

/* ---------- Hero ---------- */

.hero {
  background: linear-gradient(165deg, var(--accent) 0%, var(--accent-ink) 100%);
  color: #fff;
  padding: 34px 24px 28px;
  border-radius: 0 0 28px 28px;
  animation: hero-in 420ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes hero-in {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-emoji {
  font-size: 34px;
  line-height: 1;
  display: inline-block;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  margin: 10px 0 4px;
}

.hero-subtitle {
  margin: 0;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.82);
  max-width: 34ch;
}

/* ---------- Sphere switch (fallback picker) ---------- */

.sphere-switch {
  display: flex;
  gap: 8px;
  padding: 16px 20px 0;
  overflow-x: auto;
}

.sphere-chip {
  flex: none;
  border: none;
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 14px;
  font-family: var(--font-body);
  background: var(--accent-wash);
  color: var(--accent-ink);
  cursor: pointer;
}

/* ---------- Feature list ---------- */

.feature-list {
  list-style: none;
  margin: 22px 18px 0;
  padding: 0;
}

.feature-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 6px;
  border-bottom: 1px solid var(--divider);
  cursor: pointer;
  background: transparent;
  border-left: none;
  border-right: none;
  border-top: none;
  width: 100%;
  text-align: left;
  font-family: inherit;
  color: inherit;
}

.feature-row:last-child {
  border-bottom: none;
}

.feature-row:active {
  background: var(--accent-wash);
  border-radius: 12px;
}

.feature-icon {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--accent-wash);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  font-family: var(--font-display);
}

.feature-copy {
  flex: 1;
  min-width: 0;
}

.feature-title {
  font-size: 15.5px;
  font-weight: 600;
  margin: 0 0 2px;
}

.feature-desc {
  font-size: 13.5px;
  color: var(--hint);
  margin: 0;
  line-height: 1.35;
}

/* ---------- Bottom sheet ---------- */

.sheet-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 16, 18, 0.4);
  opacity: 0;
  transition: opacity 220ms ease;
  z-index: 20;
}

.sheet-backdrop.visible {
  opacity: 1;
}

.sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 21;
  background: var(--bg);
  border-radius: 20px 20px 0 0;
  padding: 10px 22px 26px;
  max-width: 520px;
  margin: 0 auto;
  transform: translateY(100%);
  transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

.sheet.visible {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  border-radius: 2px;
  background: var(--divider);
  margin: 6px auto 16px;
}

.sheet-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  margin: 0 0 8px;
}

.sheet-desc {
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--text);
  margin: 0 0 20px;
}

.sheet-close {
  width: 100%;
  border: none;
  border-radius: 12px;
  padding: 13px;
  background: var(--accent);
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  font-family: var(--font-body);
  cursor: pointer;
}

[hidden] {
  display: none !important;
}
