:root {
  --ink: #293253;
  --muted: #66708d;
  --line: rgba(55, 65, 105, 0.08);
  --paper: #fcfcfe;
  --focus: #6650c7;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background:
    radial-gradient(circle at 50% 0%, #ffffff 0, var(--paper) 55%),
    var(--paper);
}

button {
  font: inherit;
}

.site-shell {
  width: min(calc(100% - 2rem), 960px);
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 2.75rem) 0 3.25rem;
}

.hero {
  text-align: center;
}

.hero-mark {
  display: grid;
  width: 2rem;
  height: 2rem;
  margin: 0 auto 0.5rem;
  place-items: center;
  border-radius: 50%;
  color: #8068df;
  background: #f0edff;
  font-size: 1.25rem;
}

.eyebrow {
  margin: 0 0 0.25rem;
  color: #7d73bb;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2.2rem, 6vw, 3.1rem);
  letter-spacing: -0.055em;
  line-height: 1;
}

.hero-copy {
  max-width: 34rem;
  margin: 0.65rem auto 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.hint {
  display: inline-block;
  margin: 0 0 clamp(1.25rem, 3vw, 1.75rem);
  padding: 0.55rem 0.9rem;
  border-radius: 2rem;
  color: #765be2;
  background: #f5f1ff;
  font-size: 0.72rem;
}

.sphere-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(0.75rem, 2vw, 1rem);
}

.sphere-card {
  min-height: 164px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 22px rgba(54, 61, 100, 0.07);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.sphere-card:has(.sphere-button:focus-visible),
.sphere-card:has(.sphere-button.is-active) {
  transform: translateY(-3px);
  box-shadow: 0 13px 28px rgba(54, 61, 100, 0.12);
}

.sphere-button {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 164px;
  flex-direction: column;
  align-items: center;
  border: 0;
  border-radius: inherit;
  padding: 0.85rem 0.8rem 0.9rem;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}

.sphere {
  display: block;
  width: 88px;
  height: 88px;
  margin: 0 auto 0.7rem;
  border-radius: 50%;
  background: var(--sphere);
  box-shadow:
    inset 11px 10px 16px rgba(255, 255, 255, 0.65),
    inset -10px -13px 18px rgba(72, 48, 145, 0.1),
    0 10px 18px var(--glow);
  transition: transform 0.35s ease;
}

@media (hover: hover) and (pointer: fine) {
  .sphere-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 13px 28px rgba(54, 61, 100, 0.12);
  }

  .sphere-button:hover .sphere {
    transform: scale(1.08);
    animation: breathe 4s ease-in-out infinite;
  }
}

.sphere-button:focus-visible .sphere,
.sphere-button.is-active .sphere {
  transform: scale(1.08);
  animation: breathe 4s ease-in-out infinite;
}

.sphere-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: -5px;
}

.card-details {
  display: block;
  width: 100%;
}

.card-title {
  display: block;
  font-size: 0.76rem;
  font-weight: 750;
  line-height: 1.4;
}

.icon {
  display: inline-grid;
  width: 1.25rem;
  height: 1.25rem;
  margin-right: 0.3rem;
  place-items: center;
  border-radius: 50%;
  color: var(--accent);
  background: var(--tint);
  font-size: 0.8rem;
  vertical-align: -0.35rem;
}

.card-description {
  display: block;
  max-width: 19ch;
  margin: 0.2rem 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.62rem;
  line-height: 1.35;
}

.theme-violet { --sphere: radial-gradient(circle at 32% 25%, #fff 0 7%, #e7b8fc 23%, #ae55e8 70%, #8d3ad3 100%); --glow: #dab8ef; --accent: #8850d6; --tint: #f1e7ff; }
.theme-blue { --sphere: radial-gradient(circle at 32% 25%, #fff 0 7%, #b9e0ff 25%, #64aaf0 70%, #5797de 100%); --glow: #b9daf6; --accent: #4c91db; --tint: #e6f3ff; }
.theme-mint { --sphere: radial-gradient(circle at 32% 25%, #fff 0 7%, #baf5e5 25%, #59d2bd 70%, #3db9a4 100%); --glow: #b2eadc; --accent: #38b69f; --tint: #e4faf5; }
.theme-gold { --sphere: radial-gradient(circle at 32% 25%, #fff 0 7%, #ffe9a3 25%, #ffc64d 70%, #efa72d 100%); --glow: #f8dda0; --accent: #eba72b; --tint: #fff7df; }
.theme-pink { --sphere: radial-gradient(circle at 32% 25%, #fff 0 7%, #ffd1e9 25%, #ee7fbd 70%, #df5da9 100%); --glow: #f4c3df; --accent: #dc62a7; --tint: #ffebf5; }
.theme-indigo { --sphere: radial-gradient(circle at 32% 25%, #fff 0 7%, #cad4ff 25%, #8c9ff2 70%, #7385dd 100%); --glow: #c2ccf5; --accent: #7183dc; --tint: #ebeeff; }

.status-panel {
  max-width: 590px;
  min-height: 132px;
  margin: clamp(1.4rem, 3vw, 1.9rem) auto 0;
  padding: 1.1rem 1.25rem;
  border: 1px solid #e7e4f4;
  border-radius: 16px;
  background: #faf9ff;
  text-align: center;
}

.status-label {
  margin: 0 0 0.25rem;
  color: #8878c8;
  font-size: 0.67rem;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.status-panel h2 { margin: 0; font-size: 1.05rem; }
.status-panel p:not(.status-label) { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.78rem; line-height: 1.45; }

.reset-button {
  min-height: 2.25rem;
  margin-top: 0.55rem;
  border: 0;
  padding: 0.25rem 0.45rem;
  color: #735dd0;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.reset-button:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

footer { padding-top: 1.75rem; text-align: center; }
footer p { margin: 0.2rem; font-size: 0.82rem; }
footer p:first-child { color: #947ee1; font-size: 1.3rem; }
footer small { color: var(--muted); font-size: 0.67rem; }

@keyframes breathe {
  0%, 100% { transform: scale(1.04); }
  50% { transform: scale(1.12); }
}

@media (max-width: 760px) {
  .site-shell {
    width: min(calc(100% - 1.5rem), 560px);
    padding-top: 1.25rem;
  }

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

  .sphere-card,
  .sphere-button {
    min-height: 152px;
  }

  .sphere { width: 78px; height: 78px; }
}

@media (max-width: 430px) {
  .site-shell {
    width: min(calc(100% - 1.25rem), 380px);
    padding-bottom: 2.5rem;
  }

  .hero-copy { margin-bottom: 0.85rem; }
  .hint { margin-bottom: 1.1rem; }

  .sphere-grid { grid-template-columns: 1fr; gap: 0.65rem; }

  .sphere-card,
  .sphere-button { min-height: 124px; }

  .sphere-button {
    flex-direction: row;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
  }

  .sphere {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    margin: 0;
  }

  .card-description { max-width: 28ch; }
  .status-panel { padding: 1rem; }
}

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