/* Night sky: one phone-width column on a deep violet sky, each friend a glowing orb. */
:root {
  color-scheme: dark;

  --sky: #211a3a;
  --sky-top: #1b1736;
  --haze-violet: #43347a;
  --haze-plum: #5b3264;
  --haze-teal: #1f4a55;

  --ink: #f3eefa;
  --ink-2: rgba(243, 238, 250, 0.74);
  --ink-3: rgba(243, 238, 250, 0.5);
  --ink-4: rgba(243, 238, 250, 0.16);
  --glass: rgba(255, 255, 255, 0.07);
  --glass-2: rgba(255, 255, 255, 0.11);
  --glass-edge: rgba(255, 255, 255, 0.12);
  --night-card: rgba(36, 27, 64, 0.9);
  --on-light: #2a1f45;
  --warm: #ffd9a0;
  --warm-bg: rgba(255, 214, 150, 0.12);

  --lav: #9c88f5;
  --lav-light: #e4dcff;
  --peach: #ff9d7c;
  --peach-light: #ffe2d6;
  --mint: #6fcba7;
  --mint-light: #d8f7ea;

  --serif: 'Fraunces', ui-serif, Georgia, serif;
  --sans: 'DM Sans', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --emoji: 'Apple Color Emoji', 'Segoe UI Emoji', 'Noto Color Emoji', sans-serif;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  /* set per person from people.js */
  --c1: #e9e4f7;
  --c2: #a59dc4;
  --cink: #d9d3ea;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--sky);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;
  text-align: inherit;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:focus-visible {
  outline: 2px solid var(--cink);
  outline-offset: 3px;
}

/* ───────────── sky ───────────── */
.sky {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(110% 55% at 15% 0%, var(--haze-violet) 0%, rgba(67, 52, 122, 0) 60%),
    radial-gradient(80% 45% at 100% 35%, var(--haze-plum) 0%, rgba(91, 50, 100, 0) 65%),
    radial-gradient(90% 50% at 0% 100%, var(--haze-teal) 0%, rgba(31, 74, 85, 0) 65%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 55%, #1e1a33 100%);
}

.sky i {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  animation: twinkle var(--d, 4s) ease-in-out var(--delay, 0s) infinite;
}

@keyframes twinkle {
  50% {
    opacity: 0.12;
  }
}

/* ───────────── the three circles (us) ───────────── */
.trio {
  position: relative;
  width: 132px;
  height: 132px;
  animation: breathe 5s ease-in-out infinite;
}

.trio i {
  position: absolute;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  opacity: 0.85;
  animation: 5s ease-in-out infinite;
}

.trio i:nth-child(1) {
  left: 29px;
  top: 8px;
  background: radial-gradient(circle at 35% 30%, var(--lav-light), var(--lav) 72%);
  box-shadow: 0 0 34px rgba(156, 136, 245, 0.55);
  animation-name: trio-a;
}

.trio i:nth-child(2) {
  left: 10px;
  top: 46px;
  background: radial-gradient(circle at 35% 30%, var(--peach-light), var(--peach) 72%);
  box-shadow: 0 0 34px rgba(255, 157, 124, 0.5);
  animation-name: trio-b;
}

.trio i:nth-child(3) {
  left: 48px;
  top: 46px;
  background: radial-gradient(circle at 35% 30%, var(--mint-light), var(--mint) 72%);
  box-shadow: 0 0 34px rgba(111, 203, 167, 0.5);
  animation-name: trio-c;
}

.trio.small {
  width: 66px;
  height: 66px;
}

.trio.small i {
  width: 37px;
  height: 37px;
}

.trio.small i:nth-child(1) {
  left: 14.5px;
  top: 4px;
}

.trio.small i:nth-child(2) {
  left: 5px;
  top: 23px;
}

.trio.small i:nth-child(3) {
  left: 24px;
  top: 23px;
}

.trio.tiny {
  width: 34px;
  height: 34px;
  animation-duration: 6s;
}

.trio.tiny i {
  width: 19px;
  height: 19px;
  animation: none;
  box-shadow: none;
}

.trio.tiny i:nth-child(1) {
  left: 7.5px;
  top: 2px;
}

.trio.tiny i:nth-child(2) {
  left: 2.5px;
  top: 12px;
}

.trio.tiny i:nth-child(3) {
  left: 12.5px;
  top: 12px;
}

.orb-spin {
  animation: spin 28s linear infinite;
}

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

@keyframes trio-a {
  50% {
    transform: translateY(-7px);
  }
}

@keyframes trio-b {
  50% {
    transform: translate(-6px, 4px);
  }
}

@keyframes trio-c {
  50% {
    transform: translate(6px, 4px);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ───────────── splash ───────────── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 32px;
  text-align: center;
  background:
    radial-gradient(110% 55% at 15% 0%, var(--haze-violet) 0%, rgba(67, 52, 122, 0) 60%),
    radial-gradient(80% 45% at 100% 35%, var(--haze-plum) 0%, rgba(91, 50, 100, 0) 65%),
    radial-gradient(90% 50% at 0% 100%, var(--haze-teal) 0%, rgba(31, 74, 85, 0) 65%),
    linear-gradient(180deg, var(--sky-top) 0%, var(--sky) 55%, #1e1a33 100%);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), filter 0.8s var(--ease);
  cursor: pointer;
}

.splash.out {
  opacity: 0;
  transform: scale(1.04);
  filter: blur(6px);
  pointer-events: none;
}

.splash .orb-spin {
  opacity: 0;
  animation: spin 28s linear infinite, fade-in 0.9s var(--ease) 0.05s forwards;
}

.splash-quote {
  margin: 0;
  max-width: 320px;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 28px;
  line-height: 1.22;
  letter-spacing: -0.01em;
  font-variation-settings: 'SOFT' 100;
  color: var(--ink);
  text-wrap: balance;
  opacity: 0;
  animation: rise-in 1s var(--ease) 0.35s forwards;
}

.splash-sign {
  position: absolute;
  bottom: calc(env(safe-area-inset-bottom) + 34px);
  left: 0;
  right: 0;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  opacity: 0;
  animation: fade-in 1s var(--ease) 0.9s forwards;
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}

/* ───────────── layout ───────────── */
#app {
  max-width: 460px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) max(16px, env(safe-area-inset-right)) calc(env(safe-area-inset-bottom) + 48px)
    max(16px, env(safe-area-inset-left));
}

.enter > .rise {
  animation: rise-in 0.8s var(--ease) both;
}

.enter > .rise:nth-child(2) {
  animation-delay: 0.07s;
}
.enter > .rise:nth-child(3) {
  animation-delay: 0.14s;
}
.enter > .rise:nth-child(4) {
  animation-delay: 0.21s;
}
.enter > .rise:nth-child(5) {
  animation-delay: 0.28s;
}
.enter > .rise:nth-child(6) {
  animation-delay: 0.35s;
}
.enter > .rise:nth-child(n + 7) {
  animation-delay: 0.42s;
}

/* ───────────── type ───────────── */
.eyebrow {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.hello {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(32px, 9vw, 38px);
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 100;
  text-wrap: balance;
}

.hello em {
  color: var(--cink);
}

.section-label {
  margin: 40px 4px 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: 24px;
  letter-spacing: -0.01em;
  font-variation-settings: 'SOFT' 100;
}

.link {
  display: inline-block;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
}

.link:active {
  background: var(--glass);
}

/* ───────────── orbs ───────────── */
.orb {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  font-family: var(--emoji);
  font-size: 26px;
  line-height: 1;
  background: radial-gradient(circle at 35% 30%, var(--c1), var(--c2) 72%);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c2) 45%, transparent);
  transition: filter 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.orb.md {
  width: 50px;
  height: 50px;
  font-size: 23px;
}

.orb.sm {
  width: 42px;
  height: 42px;
  font-size: 20px;
}

.orb .badge {
  position: absolute;
  right: -3px;
  bottom: -3px;
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--ink);
  box-shadow: 0 0 0 2.5px var(--sky);
  transform: scale(0);
  transition: transform 0.4s var(--spring);
}

.orb .badge .tick {
  width: 12px;
  height: 12px;
  stroke: var(--on-light);
  stroke-width: 3.4;
}

.is-done .orb .badge,
.chip.done .orb .badge {
  transform: scale(1);
}

.chip.pop .orb .badge {
  animation: pop 0.6s var(--spring) 0.15s both;
}

.is-done .orb,
.chip.done .orb {
  box-shadow: 0 0 34px color-mix(in srgb, var(--c2) 80%, transparent), 0 0 0 3px color-mix(in srgb, var(--c1) 40%, transparent);
}

.orb::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid var(--c1);
  opacity: 0;
  pointer-events: none;
}

.orb.hit::after {
  animation: ripple 0.9s var(--ease);
}

.tick {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ───────────── header ───────────── */
.top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 0 4px;
}

.me-btn {
  margin-top: 4px;
  transition: transform 0.2s var(--spring);
}

.me-btn:active {
  transform: scale(0.92);
}

/* ───────────── the crew at a glance ───────────── */
.crew {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 28px;
}

.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 4px 0;
  border-radius: 20px;
  text-align: center;
  transition: transform 0.25s var(--spring);
}

.chip:active {
  transform: scale(0.95);
}

.chip:not(.done) .orb {
  filter: saturate(0.85) brightness(0.86);
}

.chip-name {
  margin-top: 10px;
  max-width: 100%;
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stars {
  display: flex;
  justify-content: center;
  gap: 5px;
  margin-top: 8px;
}

.stars i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ink-4);
}

.stars i.on {
  background: #fff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.9);
}

.stars i.today:not(.on) {
  background: none;
  box-shadow: inset 0 0 0 1.2px rgba(255, 255, 255, 0.6);
}

.chip-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--ink-3);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.chip-meta.good {
  color: var(--cink);
}

.crew-all {
  grid-column: 1 / -1;
  margin: 14px 0 0;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink-2);
  font-variation-settings: 'SOFT' 100;
}

/* ───────────── my check-in ───────────── */
.mine {
  position: relative;
  margin-top: 40px;
}

.hero {
  position: relative;
  display: grid;
  place-items: center;
  width: 212px;
  height: 212px;
  margin: 0 auto;
  border-radius: 50%;
  text-align: center;
  background: radial-gradient(circle at 50% 40%, color-mix(in srgb, var(--c1) 22%, transparent), color-mix(in srgb, var(--c1) 6%, transparent) 70%);
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c1) 55%, transparent), 0 0 60px color-mix(in srgb, var(--c2) 35%, transparent);
  transition: background 0.6s var(--ease), box-shadow 0.6s var(--ease), transform 0.25s var(--spring), color 0.4s;
}

.hero:active {
  transform: scale(0.97);
}

.halo {
  position: absolute;
  border-radius: 50%;
  border: 1px solid color-mix(in srgb, var(--c1) 22%, transparent);
  pointer-events: none;
}

.halo.h1 {
  inset: -14px;
  animation: halo 4.5s ease-in-out infinite;
}

.halo.h2 {
  inset: -30px;
  opacity: 0.5;
  animation: halo 4.5s ease-in-out 0.6s infinite;
}

.hero.done .halo {
  animation: none;
  border-color: color-mix(in srgb, var(--c1) 35%, transparent);
}

.hero-core {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 0 14px;
}

.hero-core strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 24px;
  line-height: 1.1;
  white-space: nowrap;
  font-variation-settings: 'SOFT' 100;
}

.hero-core small {
  font-size: 13px;
  color: var(--ink-2);
}

.hero-core small.undo {
  margin-top: 2px;
  font-size: 11.5px;
  opacity: 0.7;
}

.hero-core .tick {
  width: 34px;
  height: 34px;
  stroke: var(--on-light);
  stroke-width: 2.6;
}

.hero.done {
  color: var(--on-light);
  background: radial-gradient(circle at 38% 32%, var(--c1), var(--c2) 78%);
  box-shadow: 0 0 90px color-mix(in srgb, var(--c2) 70%, transparent), 0 0 0 7px color-mix(in srgb, var(--c1) 18%, transparent);
}

.hero.done small {
  color: color-mix(in srgb, var(--on-light) 72%, transparent);
}

.hero.pop .tick path {
  stroke-dasharray: 24;
  animation: draw 0.5s var(--ease) 0.15s both;
}

.hero.launch {
  animation: liftoff 0.7s var(--spring);
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid var(--c1);
  opacity: 0;
  pointer-events: none;
}

.hero.launch::after,
.hero.hit::after {
  animation: shockwave 1s var(--ease);
}

.cheered {
  display: flex;
  justify-content: center;
  margin: 26px 0 0;
}

.cheered span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
}

.cheered.in span {
  animation: rise-in 0.6s var(--ease) both;
}

.goal {
  margin: 28px 0 0;
  text-align: center;
  font-size: 15px;
  color: var(--ink-2);
}

.goal b {
  font-weight: 600;
  color: var(--ink);
}

/* ───────────── day dots ───────────── */
.week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-top: 14px;
}

.day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 4px 0 2px;
  border-radius: 16px;
}

.dot {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--glass);
  box-shadow: inset 0 0 0 1.5px var(--ink-4);
  transition: background 0.3s var(--ease), box-shadow 0.3s var(--ease), transform 0.25s var(--spring);
}

.dot .tick {
  width: 16px;
  height: 16px;
  stroke: var(--on-light);
  stroke-width: 3;
  opacity: 0;
}

.day.on .dot {
  background: radial-gradient(circle at 38% 32%, var(--c1), var(--c2) 85%);
  box-shadow: 0 0 14px color-mix(in srgb, var(--c2) 60%, transparent);
}

.day.on .dot .tick {
  opacity: 1;
}

.day.today:not(.on) .dot {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--cink);
}

.day.pop .dot {
  animation: pop 0.55s var(--spring);
}

.day.pop .tick path {
  stroke-dasharray: 24;
  animation: draw 0.5s var(--ease) 0.08s both;
}

.dl {
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  white-space: nowrap;
}

.day.today .dl {
  color: var(--cink);
}

button.day:active .dot {
  transform: scale(0.88);
}

.week-friend {
  margin-top: 14px;
}

.week-friend .dot {
  width: 24px;
  height: 24px;
}

.week-friend .dot .tick {
  width: 12px;
  height: 12px;
}

.week-friend .dl {
  font-size: 10.5px;
}

.hint {
  margin: 10px 0 0;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ───────────── summary + history ───────────── */
.summary {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 22px;
  padding: 12px 14px 12px 12px;
  border-radius: 24px;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
}

.summary-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  min-width: 0;
}

.summary-text strong {
  font-size: 15px;
  font-weight: 600;
}

.ring {
  position: relative;
  flex: none;
  display: grid;
  place-items: center;
}

.ring svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.ring circle {
  fill: none;
  stroke: var(--ink-4);
  stroke-width: 5;
  stroke-linecap: round;
}

.ring circle.on {
  stroke: var(--c2);
}

.ring-num {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 100;
}

.ring-num small {
  margin-left: 1px;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  color: var(--ink-3);
}

.status {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

.status.great {
  color: var(--on-light);
  background: var(--cink);
}

.status.good {
  color: var(--cink);
  background: color-mix(in srgb, var(--c2) 22%, transparent);
}

.status.low {
  color: var(--warm);
  background: var(--warm-bg);
}

.more {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 6px 4px 6px 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-2);
  border-radius: 999px;
}

.chev {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--ease);
}

[aria-expanded='true'] .chev {
  transform: rotate(180deg);
}

.history {
  margin-top: 12px;
  padding: 16px 12px 6px;
  border-radius: 22px;
  background: rgba(0, 0, 0, 0.16);
  box-shadow: inset 0 0 0 1px var(--glass-edge);
}

.history.opening {
  animation: rise-in 0.5s var(--ease) both;
}

.history-title {
  margin: 0 4px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}

.cal-head {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
}

.cal-cell {
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  max-width: 100%;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-3);
  background: var(--glass);
}

.cal-cell.on {
  color: var(--on-light);
  font-weight: 700;
  background: radial-gradient(circle at 38% 32%, var(--c1), var(--c2) 90%);
  box-shadow: 0 0 12px color-mix(in srgb, var(--c2) 45%, transparent);
}

.cal-cell.today {
  box-shadow: inset 0 0 0 2px var(--cink);
}

.cal-cell.future {
  background: none;
  opacity: 0.4;
}

.stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 16px 0 6px;
}

.stat {
  padding: 12px 14px;
  border-radius: 18px;
  background: var(--glass);
}

.stat dt {
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-2);
}

.stat dd {
  margin: 4px 0 0;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 100;
}

.stat dd small {
  margin-left: 5px;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--ink-3);
}

/* ───────────── cards ───────────── */
.card {
  position: relative;
  margin-top: 14px;
  padding: 16px;
  border-radius: 28px;
  background: var(--glass);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.card.glow {
  animation: glow 1.5s var(--ease);
}

.alert {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding: 14px 14px 14px 18px;
  border-radius: 22px;
  font-size: 14px;
  color: var(--warm);
  background: var(--warm-bg);
  border: 1px solid rgba(255, 214, 150, 0.25);
}

.alert p {
  flex: 1;
  margin: 0;
}

.alert button {
  flex: none;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: var(--on-light);
  background: var(--warm);
}

/* ───────────── friend cards ───────────── */
.friend.is-done {
  background: linear-gradient(160deg, color-mix(in srgb, var(--c2) 16%, transparent) 0%, var(--glass) 60%);
}

.friend-top {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.friend-id {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.friend-id strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.1;
  letter-spacing: -0.01em;
  font-variation-settings: 'SOFT' 100;
}

.friend-id small {
  margin-top: 2px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.friend:not(.is-done) .friend-top .orb {
  filter: saturate(0.85) brightness(0.86);
}

.friend-foot,
.friend-meta {
  display: flex;
  align-items: center;
  gap: 8px;
}

.friend-foot {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--glass-edge);
  min-height: 52px;
}

.friend-meta {
  margin-top: 6px;
  min-height: 30px;
}

.friend-meta .status {
  align-self: center;
}

.spacer {
  flex: 1;
}

.streak {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink);
  background: var(--glass-2);
  white-space: nowrap;
}

.also {
  min-width: 0;
  font-size: 12.5px;
  color: var(--ink-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.waiting {
  font-size: 13px;
  color: var(--ink-3);
}

.cheer {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 15px 9px 12px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--on-light);
  background: var(--c1);
  white-space: nowrap;
  transition: transform 0.25s var(--spring), background 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.cheer:active {
  transform: scale(0.94);
}

.cheer .e {
  font-family: var(--emoji);
  font-size: 16px;
  line-height: 1;
}

.cheer.on {
  background: var(--c2);
  box-shadow: 0 0 22px color-mix(in srgb, var(--c2) 60%, transparent);
}

.cheer.on .e {
  animation: pop 0.5s var(--spring);
}

/* ───────────── together ───────────── */
.together {
  margin-top: 30px;
  padding: 20px 18px 16px;
}

.kicker {
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.together-num {
  margin: 6px 0 0;
  font-size: 15px;
  color: var(--ink-2);
}

.together-num span {
  margin-right: 4px;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  font-variation-settings: 'SOFT' 100;
}

.bars {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 92px 1fr 18px;
  align-items: center;
  gap: 10px;
}

.bar-name {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-name .e {
  font-family: var(--emoji);
}

.bar {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.seg {
  position: relative;
  height: 12px;
  border-radius: 6px;
  background: var(--glass-2);
}

.seg.on {
  background: radial-gradient(circle at 35% 30%, var(--c1), var(--c2) 90%);
  box-shadow: 0 0 10px color-mix(in srgb, var(--c2) 50%, transparent);
}

.seg.line::after {
  content: '';
  position: absolute;
  top: -5px;
  bottom: -5px;
  right: -3px;
  width: 2px;
  border-radius: 1px;
  background: var(--ink-3);
}

.bar-num {
  text-align: right;
  font-family: var(--serif);
  font-size: 17px;
  font-variation-settings: 'SOFT' 100;
}

.together-msg {
  margin: 18px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.3;
  font-variation-settings: 'SOFT' 100;
  text-wrap: pretty;
}

.legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 12.5px;
  color: var(--ink-3);
}

.legend-mark {
  width: 2px;
  height: 14px;
  border-radius: 1px;
  background: var(--ink-3);
}

/* ───────────── footer ───────────── */
.foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-top: 44px;
  text-align: center;
}

.motto {
  margin: 8px 0 0;
  font-family: var(--serif);
  font-style: italic;
  font-weight: 300;
  font-size: 17px;
  color: var(--ink-2);
  font-variation-settings: 'SOFT' 100;
}

/* ───────────── picker + loading ───────────── */
.picker {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 6vh;
  text-align: center;
  animation: rise-in 0.8s var(--ease) both;
}

.picker .trio {
  margin-bottom: 24px;
}

.picker .hello {
  font-size: 40px;
}

.lede {
  margin: 12px 0 0;
  max-width: 300px;
  color: var(--ink-2);
}

.pick-list {
  display: grid;
  gap: 12px;
  width: 100%;
  margin: 30px 0 14px;
}

.pick {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 14px 18px 14px 14px;
  border-radius: 26px;
  text-align: left;
  background: linear-gradient(120deg, color-mix(in srgb, var(--c2) 18%, transparent), var(--glass) 70%);
  border: 1px solid var(--glass-edge);
  transition: transform 0.25s var(--spring);
}

.pick:active {
  transform: scale(0.98);
}

.pick-text {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.pick-text strong {
  font-family: var(--serif);
  font-weight: 400;
  font-size: 22px;
  line-height: 1.15;
  font-variation-settings: 'SOFT' 100;
}

.pick-text small {
  font-size: 14px;
  color: var(--ink-2);
}

.pick-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: var(--cink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding-top: 30vh;
  color: var(--ink-2);
}

/* ───────────── a cheer arrived ───────────── */
.banner {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 12px);
  left: 50%;
  z-index: 75;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100% - 32px));
  padding: 12px 16px 12px 12px;
  border-radius: 22px;
  background: var(--night-card);
  border: 1px solid var(--glass-edge);
  box-shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.7), 0 0 40px color-mix(in srgb, var(--c2) 30%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transform: translate(-50%, calc(-100% - 40px - env(safe-area-inset-top)));
  transition: transform 0.6s var(--spring);
  cursor: pointer;
}

.banner:empty {
  display: none;
}

.banner.show {
  transform: translate(-50%, 0);
}

.banner-faces {
  display: flex;
}

.banner-faces .orb + .orb {
  margin-left: -12px;
}

.banner-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  font-size: 14.5px;
}

.banner-text b {
  font-weight: 600;
}

.banner-text small {
  font-size: 12.5px;
  color: var(--ink-3);
}

/* ───────────── toast + effects ───────────── */
.toast {
  position: fixed;
  left: 50%;
  bottom: calc(env(safe-area-inset-bottom) + 22px);
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 14px;
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px 12px 20px;
  border-radius: 24px;
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink);
  background: var(--night-card);
  border: 1px solid var(--glass-edge);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translate(-50%, 24px) scale(0.96);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.45s var(--spring);
}

.toast:empty {
  display: none;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0) scale(1);
  pointer-events: auto;
}

.toast span {
  min-width: 0;
}

.toast button {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--on-light);
  background: var(--ink);
}

.fx {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 60;
  pointer-events: none;
}

.flyer {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 65;
  font-family: var(--emoji);
  line-height: 1;
  pointer-events: none;
  will-change: transform;
}

.plus {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 66;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--on-light);
  background: var(--ink);
  white-space: nowrap;
  pointer-events: none;
}

@keyframes halo {
  50% {
    transform: scale(1.03);
    opacity: 0.7;
  }
}

@keyframes pop {
  0% {
    transform: scale(0.4);
  }
  60% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes ripple {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.7);
  }
}

@keyframes shockwave {
  0% {
    opacity: 0.9;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

@keyframes liftoff {
  0% {
    transform: scale(1);
  }
  30% {
    transform: scale(0.94);
  }
  65% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes draw {
  from {
    stroke-dashoffset: 24;
  }
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
  25% {
    box-shadow: 0 0 0 3px var(--c2), 0 0 40px color-mix(in srgb, var(--c2) 50%, transparent);
  }
}

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