:root {
  --ink: #1f2444;
  --muted: #777095;
  --paper: #fff8fc;
  --safe-x: 24px;
  --safe-top: 24px;
  --safe-bottom: 32px;
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --major-action-space: 32px;
  --today-control-width: 96%;
  --mood-card-height: clamp(84px, 12.65vh, 122px);
  --mood-icon-size: clamp(46px, 6.6vh, 72px);
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 201, 226, 0.88), transparent 34%),
    radial-gradient(circle at 86% 18%, rgba(181, 231, 241, 0.92), transparent 30%),
    radial-gradient(circle at 54% 86%, rgba(214, 184, 255, 0.45), transparent 36%),
    linear-gradient(145deg, #fffdf9 0%, #f6efff 54%, #fff4fa 100%);
  color: var(--ink);
  font-family: Avenir, "Avenir Next", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  overflow: hidden;
  overscroll-behavior: none;
}

button {
  -webkit-tap-highlight-color: transparent;
  font: inherit;
}

.phone-shell {
  position: relative;
  width: min(100vw, calc(100vh * 9 / 16));
  height: 100vh;
  max-height: 100vh;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 18%, rgba(255, 209, 233, 0.6), transparent 30%),
    radial-gradient(circle at 82% 20%, rgba(189, 238, 242, 0.66), transparent 28%),
    radial-gradient(circle at 50% 42%, rgba(255, 255, 255, 0.94), transparent 34%),
    linear-gradient(180deg, #fffafc 0%, #f7f2ff 58%, #fff8fb 100%);
  box-shadow: 0 28px 80px rgba(70, 48, 86, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 34px;
}

@supports (height: 100svh) {
  .phone-shell {
    width: min(100vw, calc(100svh * 9 / 16));
    height: 100svh;
    max-height: 100svh;
  }
}

@supports (height: 100dvh) {
  .phone-shell {
    width: min(100vw, calc(100dvh * 9 / 16));
    height: 100dvh;
    max-height: 100dvh;
  }
}

.phone-shell::before,
.phone-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 215, 104, 0.86) 0 2px, transparent 3px),
    radial-gradient(circle, rgba(255, 255, 255, 0.95) 0 1px, transparent 2px);
  background-size: 92px 112px, 64px 88px;
  background-position: 18px 46px, 42px 16px;
  opacity: 0.68;
  animation: twinkle 4.8s ease-in-out infinite;
}

.phone-shell::after {
  filter: blur(0.5px);
  opacity: 0.34;
  animation-delay: -2s;
}

@keyframes twinkle {
  0%,
  100% {
    opacity: 0.28;
    transform: translateY(0);
  }
  50% {
    opacity: 0.72;
    transform: translateY(-5px);
  }
}

.screen {
  position: absolute;
  inset: 0;
  display: none;
  padding: var(--safe-top) var(--safe-x) var(--safe-bottom);
  z-index: 1;
  overflow: hidden;
}

.screen.active {
  display: block;
  animation: screenIn 320ms ease-out;
}

@keyframes screenIn {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.logo-asset {
  width: 73%;
  max-width: 322px;
  display: block;
  margin: 2px auto 4px;
}

.logo-small {
  width: 52%;
  max-width: 224px;
  display: block;
  margin: 0 auto;
}

#screen-result {
  text-align: center;
}

#screen-result.active {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: clamp(118px, 14vh, 148px);
}

#screen-result .logo-small {
  flex: 0 0 auto;
}

#screen-start {
  display: none;
  padding: clamp(34px, 6.2vh, 62px) var(--safe-x) clamp(30px, 5.2vh, 52px);
  background-image: url("assets/ui/background.png");
  background-size: cover;
  background-position: center;
  isolation: isolate;
}

#screen-start.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.start-art {
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 255, 255, 0.36), transparent 32%),
    radial-gradient(circle at 52% 72%, rgba(255, 238, 191, 0.26), transparent 28%);
  pointer-events: none;
}

.start-art::before,
.start-art::after {
  content: "";
  position: absolute;
  width: 18px;
  aspect-ratio: 1;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 10px rgba(255, 211, 109, 0.82));
  animation: twinkle 3.8s ease-in-out infinite;
}

.start-art::before {
  top: 18%;
  left: 17%;
}

.start-art::after {
  right: 14%;
  bottom: 15%;
  width: 13px;
  animation-delay: -1.4s;
}

.start-content {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.start-logo {
  width: min(78%, 338px);
  margin-bottom: clamp(34px, 5.8vh, 58px);
  filter: drop-shadow(0 10px 20px rgba(119, 92, 160, 0.12));
  animation: startFloat 4.8s ease-in-out infinite;
}

.start-mascots {
  width: min(78%, 330px);
  margin-bottom: clamp(24px, 4.2vh, 40px);
  filter: drop-shadow(0 22px 28px rgba(136, 96, 106, 0.2));
  animation: mascotFloat 4.4s ease-in-out infinite;
}

.start-tagline {
  color: #24243f;
  font-size: clamp(29px, 4.15vh, 38px);
  line-height: 1.22;
  font-weight: 900;
  letter-spacing: 0;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.78);
}

.start-cta {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  width: min(84%, 324px);
  min-height: 66px;
  margin: clamp(34px, 5.6vh, 58px) auto 0;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(135deg, #9a73f8 0%, #c456f0 58%, #9147e3 100%);
  color: #fff;
  font-size: clamp(18px, 2.45vh, 22px);
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(94, 52, 148, 0.2);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 -8px 18px rgba(95, 39, 176, 0.22),
    0 17px 30px rgba(145, 71, 227, 0.32);
  cursor: pointer;
  transition: transform 130ms cubic-bezier(.2, 1.55, .42, 1), filter 160ms ease, box-shadow 160ms ease;
}

.start-cta::before {
  content: "";
  position: absolute;
  inset: 6px 16px auto;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}

.start-cta:active {
  transform: scale(0.97);
  filter: brightness(1.06) saturate(1.05);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 18px rgba(95, 39, 176, 0.24),
    0 11px 20px rgba(145, 71, 227, 0.28);
}

.start-arrow {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.94);
  font-size: 28px;
  line-height: 1;
}

@keyframes startFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes mascotFloat {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.015);
  }
}

.action-row {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
}

.asset-btn {
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 130ms cubic-bezier(.2, 1.55, .42, 1), filter 160ms ease;
}

.asset-btn img {
  display: block;
  width: 100%;
  height: auto;
  pointer-events: none;
}

.asset-btn:active {
  transform: scale(0.97);
  filter: brightness(1.06) saturate(1.05);
}

.tab-btn {
  width: 116px;
}

.today-header {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 42px 1fr 42px;
  align-items: center;
  min-height: 40px;
  margin: 0 0 var(--space-2);
}

.menu-toggle {
  position: relative;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: 0 8px 18px rgba(84, 68, 120, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 130ms cubic-bezier(.2, 1.55, .42, 1), filter 160ms ease;
}

.menu-toggle:active {
  transform: scale(0.96);
  filter: brightness(1.03);
}

.menu-toggle span {
  position: absolute;
  left: 11px;
  width: 16px;
  height: 2px;
  border-radius: 999px;
  background: #55536d;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.65);
}

.menu-toggle span:nth-child(1) { top: 12px; }
.menu-toggle span:nth-child(2) { top: 18px; }
.menu-toggle span:nth-child(3) { top: 24px; }

.today-wordmark {
  justify-self: center;
  width: 152px;
  height: auto;
  transform: translateY(3px);
}

.header-spacer {
  width: 42px;
  height: 42px;
}

.today-menu {
  position: absolute;
  top: 44px;
  left: 0;
  display: grid;
  gap: 8px;
  width: 144px;
  padding: 10px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 18px 34px rgba(73, 55, 105, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(14px);
  opacity: 0;
  transform: translateY(-8px) scale(0.96);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.today-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.today-menu .tab-btn {
  width: 124px;
}

.asset-panel {
  position: relative;
  width: 100%;
}

.mood-panel {
  height: calc(100% - 56px);
  min-height: 0;
}

.weekly-panel {
  height: 68%;
  margin-top: 16px;
}

.panel-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
}

.panel-content {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 32px 28px 24px;
  text-align: center;
}

#screen-today {
  padding: var(--safe-top) var(--safe-x) var(--safe-bottom);
}

#screen-today .mood-panel {
  margin-top: 0;
}

#screen-today .panel-img {
  display: none;
}

#screen-today .panel-content {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  height: 100%;
  min-height: 0;
  padding: 0;
}

.greeting-pill {
  align-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 18px;
  margin: 0 0 var(--space-2);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 253, 0.84));
  color: #34304e;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 10px 26px rgba(171, 94, 130, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

.greeting-pill::before {
  content: "";
  width: 24px;
  height: 24px;
  margin-right: 8px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 2px, transparent 3px),
    conic-gradient(from 30deg, #ffd56e, #ffb83d, #ffd56e, #ffb83d, #ffd56e);
  box-shadow: 0 4px 10px rgba(255, 184, 61, 0.26);
}

#screen-today h1 {
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: 0;
}

#screen-today .hint {
  margin-top: var(--space-1);
  font-size: 14px;
}

.micro-label {
  margin: 0 0 8px;
  color: #d65fc4;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 32px;
  line-height: 1.04;
  color: var(--ink);
}

.hint {
  margin-top: 10px;
  color: #7e7696;
  font-size: 16px;
  font-weight: 650;
}

.chip-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: var(--space-2) auto var(--space-2);
  width: var(--today-control-width);
  flex: 1 1 auto;
  min-height: 0;
}

.mood-chip {
  position: relative;
  border: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 4%, rgba(255, 255, 255, 0.98), transparent 34%),
    linear-gradient(180deg, rgba(255, 253, 247, 0.96), rgba(255, 250, 240, 0.86)),
    linear-gradient(135deg, var(--mood-card-start), var(--mood-card-end));
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.8),
    0 10px 22px rgba(82, 60, 120, 0.09);
  padding: 9px 9px 8px;
  width: 100%;
  cursor: pointer;
  transition: transform 180ms cubic-bezier(.18, 1.5, .32, 1), filter 180ms ease;
}

.mood-chip::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.92);
  pointer-events: none;
}

.mood-icon {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  width: var(--mood-icon-size);
  height: var(--mood-icon-size);
  object-fit: contain;
  pointer-events: none;
  filter:
    drop-shadow(0 0 0 rgba(255, 255, 255, 1))
    drop-shadow(0 6px 8px rgba(74, 52, 96, 0.18));
}

.mood-name {
  position: relative;
  z-index: 1;
  color: var(--mood-accent);
  font-size: 16px;
  font-weight: 850;
  line-height: 1.05;
  white-space: nowrap;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.82);
}

.mood-description {
  position: relative;
  z-index: 1;
  display: block;
  max-width: 100%;
  color: #6f7180;
  font-size: 9px;
  font-weight: 750;
  line-height: 1.05;
  white-space: nowrap;
}

.mood-chip.long-label {
  gap: 1px;
}

.mood-chip.long-label .mood-name {
  font-size: 12px;
}

.mood-chip.long-label .mood-description {
  font-size: 8px;
}

.mood-shine {
  position: absolute;
  left: 20px;
  top: 12px;
  width: 42px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.12));
  transform: rotate(-36deg);
  pointer-events: none;
}

.mood-corner-sparkle {
  position: absolute;
  right: 10px;
  top: 9px;
  width: 13px;
  height: 13px;
  background: rgba(255, 255, 255, 0.95);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 5px rgba(255, 215, 110, 0.72));
  pointer-events: none;
}

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

.mood-chip.selected {
  transform: translateY(-5px) scale(1.025);
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.86),
    inset 0 0 0 5px color-mix(in srgb, var(--mood-accent) 52%, white),
    0 12px 20px rgba(170, 104, 224, 0.22);
  filter: saturate(1.12);
}

.energy-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-1);
  width: var(--today-control-width);
  flex: 0 0 auto;
  margin: 0 auto var(--major-action-space);
}

.energy {
  min-height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.86), rgba(255,255,255,.48));
  color: #6f6487;
  font-size: 15px;
  font-weight: 850;
  box-shadow: 0 8px 20px rgba(110, 75, 130, 0.08);
}

.energy.active {
  background: linear-gradient(180deg, #ffe1f0, #d9cdff);
  color: #5a3c75;
  box-shadow: 0 10px 22px rgba(182, 102, 223, 0.16), inset 0 1px 0 rgba(255,255,255,.9);
}

.reveal-btn {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(76%, 324px);
  max-width: 320px;
  min-height: 66px;
  margin: 0 auto;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(135deg, #9a73f8 0%, #c456f0 58%, #9147e3 100%);
  color: #fff;
  font-size: clamp(18px, 2.45vh, 22px);
  font-weight: 850;
  letter-spacing: 0;
  text-shadow: 0 1px 0 rgba(94, 52, 148, 0.2);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 -8px 18px rgba(95, 39, 176, 0.22),
    0 17px 30px rgba(145, 71, 227, 0.32);
  cursor: pointer;
  transform: translateZ(0);
  transition: transform 130ms cubic-bezier(.2, 1.55, .42, 1), filter 160ms ease, box-shadow 160ms ease;
}

.reveal-btn::before {
  content: "";
  position: absolute;
  inset: 6px 16px auto;
  height: 18px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}

.reveal-btn:active {
  transform: scale(0.97);
  filter: brightness(1.06) saturate(1.05);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.34),
    inset 0 -8px 18px rgba(95, 39, 176, 0.24),
    0 11px 20px rgba(145, 71, 227, 0.28);
}

.reveal-sparkle {
  display: inline-grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: #ffe783;
  font-size: 24px;
  line-height: 1;
  filter: drop-shadow(0 0 8px rgba(255, 221, 113, 0.66));
}

.aura-stage {
  position: relative;
  width: 100%;
  height: clamp(292px, 43vh, 414px);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin: clamp(24px, 4vh, 38px) auto clamp(6px, 1.4vh, 14px);
  isolation: isolate;
}

.aura-stage::before,
.aura-stage::after {
  content: "";
  position: absolute;
  width: 88%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    conic-gradient(from 0deg, transparent, rgba(255, 213, 110, 0.22), transparent, rgba(181, 238, 242, 0.28), transparent),
    radial-gradient(circle, rgba(255,255,255,.72), transparent 58%);
  filter: blur(8px);
  animation: auraRotate 8s linear infinite;
  z-index: 0;
}

.aura-stage::after {
  width: 66%;
  animation-duration: 5.5s;
  animation-direction: reverse;
  opacity: .72;
}

.aura-frame {
  position: absolute;
  width: 92%;
  max-width: 384px;
  opacity: 0.98;
  animation: breathe 5s ease-in-out infinite;
  z-index: 1;
}

.palette-orb {
  position: relative;
  width: min(70vw, 296px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(#ffc5dc, #c7b6ff, #b7eced, #ffe7b8, #ffc5dc);
  box-shadow:
    inset 0 0 34px rgba(255, 255, 255, 0.82),
    0 0 0 12px rgba(255, 255, 255, 0.28),
    0 0 42px rgba(235, 132, 225, 0.28),
    0 26px 80px rgba(128, 89, 160, 0.28);
  filter: saturate(1.04);
  animation: orbSpin 9s linear infinite, orbFloat 4.5s ease-in-out infinite;
  z-index: 2;
}

.palette-orb::after {
  content: "";
  position: absolute;
  inset: 13%;
  border-radius: inherit;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, 0.85), transparent 34%);
}

@keyframes breathe {
  0%,
  100% {
    transform: scale(0.98) rotate(0deg);
  }
  50% {
    transform: scale(1.04) rotate(4deg);
  }
}

@keyframes auraRotate {
  to {
    transform: rotate(1turn);
  }
}

@keyframes orbSpin {
  to {
    rotate: 1turn;
  }
}

@keyframes orbFloat {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -8px;
  }
}

.aura-stage.burst .palette-orb {
  animation: orbSpin 9s linear infinite, orbFloat 4.5s ease-in-out infinite, revealPop 760ms cubic-bezier(.16, 1.5, .32, 1);
}

.aura-stage.burst::before {
  animation: auraRotate 8s linear infinite, auraBurstPulse 760ms ease-out;
}

.aura-stage.burst::after {
  animation: auraRotate 5.5s linear infinite reverse, auraBurstGlow 760ms ease-out;
}

.aura-stage.burst .aura-frame {
  animation: breathe 5s ease-in-out infinite, auraFramePop 760ms cubic-bezier(.16, 1.45, .32, 1);
}

@keyframes revealPop {
  0% {
    transform: scale(.68);
    filter: brightness(1.45) saturate(1.25);
  }
  58% {
    transform: scale(1.1);
    filter: brightness(1.2) saturate(1.18);
  }
  100% {
    transform: scale(1);
    filter: saturate(1.04);
  }
}

@keyframes auraBurstPulse {
  0% {
    transform: scale(.72) rotate(0deg);
    opacity: .18;
  }
  48% {
    transform: scale(1.06) rotate(28deg);
    opacity: .92;
  }
  100% {
    transform: scale(1) rotate(58deg);
    opacity: .72;
  }
}

@keyframes auraBurstGlow {
  0% {
    transform: scale(.76) rotate(0deg);
    opacity: .12;
  }
  52% {
    transform: scale(1.16) rotate(-22deg);
    opacity: .88;
  }
  100% {
    transform: scale(1) rotate(-44deg);
    opacity: .72;
  }
}

@keyframes auraFramePop {
  0% {
    transform: scale(.9) rotate(-5deg);
    filter: brightness(1.18);
  }
  60% {
    transform: scale(1.055) rotate(4deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    filter: none;
  }
}

.result-copy {
  align-self: center;
  display: grid;
  justify-items: center;
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: 0 18px;
  margin: 0 auto;
}

.result-copy h2,
.weekly-content h2 {
  font-size: 38px;
  line-height: 1.02;
  color: #242143;
}

.weekly-content h2 {
  font-size: clamp(38px, 6vh, 56px);
  font-weight: 850;
  letter-spacing: 0;
}

.result-copy p:last-child,
.weekly-content p:last-child {
  margin-top: 12px;
  color: var(--muted);
  font-size: 19px;
  line-height: 1.35;
  font-weight: 700;
}

.weekly-content p:last-child {
  max-width: 310px;
  margin-top: 20px;
  color: #77768b;
  font-size: clamp(19px, 2.9vh, 27px);
  line-height: 1.34;
  font-weight: 800;
}

.action-row {
  position: absolute;
  left: 20px;
  right: 20px;
  bottom: 28px;
}

.action-row .asset-btn {
  width: 31%;
}

#screen-weekly {
  padding: 0;
  background-image: url("assets/ui/background.png");
  background-size: cover;
  background-position: center;
  text-align: center;
}

.weekly-back-btn {
  position: absolute;
  top: clamp(18px, 3.2vh, 34px);
  left: clamp(18px, 5vw, 34px);
  z-index: 5;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 248, 253, 0.72));
  color: #5b536d;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.95),
    0 10px 22px rgba(84, 68, 120, 0.12);
  cursor: pointer;
  transition: transform 130ms cubic-bezier(.2, 1.55, .42, 1), filter 160ms ease;
}

.weekly-back-btn:active {
  transform: scale(0.96);
  filter: brightness(1.04);
}

.weekly-share-card {
  position: absolute;
  inset: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: clamp(36px, 5.5vh, 58px) 34px clamp(126px, 15vh, 164px);
  background:
    radial-gradient(circle at 18% 12%, rgba(255, 224, 196, 0.5), transparent 30%),
    radial-gradient(circle at 84% 12%, rgba(213, 184, 255, 0.42), transparent 32%),
    radial-gradient(circle at 14% 88%, rgba(189, 222, 255, 0.5), transparent 26%),
    radial-gradient(circle at 84% 86%, rgba(255, 185, 226, 0.48), transparent 28%),
    rgba(255, 255, 255, 0.18);
}

.weekly-share-card::before,
.weekly-share-card::after {
  content: "";
  position: absolute;
  inset: auto auto 0 0;
  width: 46%;
  height: 18%;
  border-radius: 50% 50% 0 0;
  background:
    radial-gradient(circle at 26% 60%, rgba(255, 255, 255, .44), transparent 30%),
    radial-gradient(circle at 48% 45%, rgba(255, 255, 255, .34), transparent 34%);
  filter: blur(.2px);
  opacity: .78;
  pointer-events: none;
}

.weekly-share-card::after {
  left: auto;
  right: 0;
  width: 34%;
  height: 14%;
  opacity: .58;
}

.weekly-sparkles,
.weekly-sparkles::before,
.weekly-sparkles::after {
  position: absolute;
  width: 34px;
  aspect-ratio: 1;
  background: rgba(255, 255, 255, 0.95);
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 12px rgba(255, 215, 110, 0.48));
}

.weekly-sparkles {
  top: 9%;
  left: 13%;
}

.weekly-sparkles::before,
.weekly-sparkles::after {
  content: "";
}

.weekly-sparkles::before {
  width: 22px;
  top: 58px;
  left: -28px;
}

.weekly-sparkles::after {
  width: 24px;
  top: 260px;
  left: 364px;
  background: #ffd978;
}

.weekly-content h1 {
  font-size: clamp(29px, 4.4vh, 44px);
  line-height: 1.12;
  font-weight: 900;
  color: #10152f;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.65);
}

.weekly-vibe-list {
  display: grid;
  gap: clamp(16px, 2.4vh, 26px);
  margin: clamp(32px, 4.8vh, 52px) auto clamp(32px, 4.8vh, 52px);
  color: #10152f;
  font-size: clamp(34px, 5.2vh, 52px);
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: 0;
}

.weekly-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  width: min(86%, 390px);
  height: clamp(60px, 8vh, 84px);
  margin: 0 auto clamp(30px, 4.6vh, 50px);
  overflow: hidden;
  border-radius: 15px;
  box-shadow:
    inset 0 0 0 3px rgba(255, 255, 255, 0.88),
    0 14px 26px rgba(120, 88, 142, 0.14);
}

.weekly-strip-segment {
  min-width: 0;
  border-right: 3px solid rgba(255, 255, 255, 0.78);
  animation: barIn 560ms cubic-bezier(.18, 1.35, .32, 1) both;
}

.weekly-strip-segment:last-child {
  border-right: 0;
}

@keyframes barIn {
  from {
    opacity: 0;
    transform: scaleX(.45) translateY(12px);
  }
  to {
    opacity: 1;
    transform: scaleX(1) translateY(0);
  }
}

.weekly-note {
  display: grid;
  gap: 10px;
  margin-bottom: clamp(22px, 3.2vh, 34px);
  color: #3f4258;
}

.weekly-note strong {
  font-size: clamp(21px, 3.2vh, 31px);
  line-height: 1.1;
  font-weight: 900;
}

.weekly-note span {
  font-size: clamp(19px, 2.9vh, 27px);
  line-height: 1.15;
  font-weight: 750;
}

.weekly-brand {
  display: grid;
  gap: 16px;
  justify-items: center;
  color: #3c3c52;
  font-size: clamp(16px, 2.45vh, 23px);
  font-weight: 800;
}

.weekly-brand img {
  width: min(56%, 250px);
  filter: drop-shadow(0 8px 18px rgba(119, 92, 160, 0.1));
}

.download-image-btn {
  position: absolute;
  left: 50%;
  bottom: clamp(34px, 4.8vh, 54px);
  display: flex;
  min-height: 58px;
  width: min(70%, 300px);
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 42%),
    linear-gradient(135deg, #9a73f8 0%, #c456f0 58%, #9147e3 100%);
  color: #fff;
  font-size: clamp(17px, 2.4vh, 21px);
  font-weight: 850;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.32),
    inset 0 -8px 18px rgba(95, 39, 176, 0.22),
    0 17px 30px rgba(145, 71, 227, 0.32);
  cursor: pointer;
  transform: translateX(-50%);
  transition: transform 130ms cubic-bezier(.2, 1.55, .42, 1), filter 160ms ease;
  z-index: 3;
}

.download-image-btn:active {
  transform: translateX(-50%) scale(0.97);
  filter: brightness(1.06);
}

.toast {
  position: absolute;
  left: 50%;
  bottom: 140px;
  transform: translateX(-50%) translateY(24px);
  opacity: 0;
  padding: 13px 18px;
  border-radius: 999px;
  background: rgba(74, 52, 89, 0.86);
  color: white;
  font-size: 15px;
  font-weight: 750;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.tap-sparkle {
  position: absolute;
  z-index: 3;
  width: 18px;
  height: 18px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  animation: sparkleBurst 680ms ease-out forwards;
}

.tap-sparkle::before,
.tap-sparkle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: #ffd66e;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 8px rgba(255, 198, 103, .65));
}

.tap-sparkle::after {
  inset: 6px;
  background: #fff;
}

@keyframes sparkleBurst {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(.4) rotate(0deg);
  }
  45% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translate(-50%, -86%) scale(1.9) rotate(80deg);
  }
}

@media (max-height: 760px) {
  :root {
    --safe-x: 18px;
    --safe-top: 16px;
    --safe-bottom: 20px;
    --space-1: 6px;
    --space-2: 10px;
    --space-3: 16px;
    --major-action-space: 14px;
    --today-control-width: 98%;
    --mood-card-height: clamp(72px, 11.2vh, 86px);
    --mood-icon-size: clamp(42px, 7vh, 52px);
  }

  .phone-shell {
    width: min(100vw, calc(100vh * 9 / 16));
    height: 100vh;
    max-height: 100vh;
    border-radius: 26px;
  }

  @supports (height: 100svh) {
    .phone-shell {
      width: min(100vw, calc(100svh * 9 / 16));
      height: 100svh;
      max-height: 100svh;
    }
  }

  @supports (height: 100dvh) {
    .phone-shell {
      width: min(100vw, calc(100dvh * 9 / 16));
      height: 100dvh;
      max-height: 100dvh;
    }
  }

  .today-header {
    grid-template-columns: 36px 1fr 36px;
    min-height: 34px;
  }

  .menu-toggle {
    width: 34px;
    height: 34px;
    border-radius: 12px;
  }

  .menu-toggle span {
    left: 10px;
    width: 14px;
  }

  .menu-toggle span:nth-child(1) { top: 10px; }
  .menu-toggle span:nth-child(2) { top: 16px; }
  .menu-toggle span:nth-child(3) { top: 22px; }

  .today-wordmark {
    width: 132px;
  }

  .header-spacer {
    width: 36px;
    height: 36px;
  }

  .greeting-pill {
    min-height: 30px;
    padding: 0 14px;
    font-size: 12px;
  }

  .greeting-pill::before {
    width: 20px;
    height: 20px;
    margin-right: 6px;
  }

  #screen-today h1 {
    font-size: clamp(22px, 4.2vh, 26px);
    line-height: 1.04;
  }

  #screen-today .hint {
    margin-top: 6px;
    font-size: 12px;
  }

  .chip-grid {
    gap: 6px;
    margin: 10px auto 10px;
  }

  .mood-chip {
    border-radius: 18px;
    gap: 1px;
    padding: 5px 6px;
    box-shadow:
      inset 0 0 0 2px rgba(255, 255, 255, 0.78),
      0 7px 14px rgba(82, 60, 120, 0.08);
  }

  .mood-name {
    font-size: 13px;
  }

  .mood-description {
    font-size: 7px;
  }

  .mood-chip.long-label .mood-name {
    font-size: 10px;
  }

  .mood-chip.long-label .mood-description {
    font-size: 6px;
  }

  .mood-shine {
    left: 14px;
    top: 9px;
    width: 30px;
    height: 9px;
  }

  .mood-corner-sparkle {
    right: 8px;
    top: 7px;
    width: 10px;
    height: 10px;
  }

  .energy {
    min-height: 34px;
    font-size: 13px;
  }

  .reveal-btn {
    width: 68%;
    min-height: 56px;
    font-size: 17px;
  }

  #screen-result.active {
    padding-bottom: 104px;
  }

  #screen-result .logo-small {
    width: 46%;
  }

  .aura-stage {
    height: clamp(236px, 39vh, 300px);
    margin: 12px auto 4px;
  }

  .palette-orb {
    width: min(58vw, 226px);
  }

  .result-copy h2,
  .weekly-content h2 {
    font-size: 30px;
  }

  .result-copy p:last-child,
  .weekly-content p:last-child {
    margin-top: 8px;
    font-size: 15px;
  }

  .action-row {
    bottom: 20px;
  }

  .weekly-share-card {
    padding: 28px 26px 112px;
  }

  .weekly-back-btn {
    top: 16px;
    left: 16px;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    font-size: 24px;
  }

  .weekly-content h1 {
    font-size: 27px;
  }

  .weekly-vibe-list {
    gap: 14px;
    margin: 28px auto 30px;
    font-size: 35px;
  }

  .weekly-strip {
    width: 82%;
    height: 58px;
    margin-bottom: 30px;
  }

  .weekly-note {
    gap: 8px;
    margin-bottom: 22px;
  }

  .weekly-note strong {
    font-size: 20px;
  }

  .weekly-note span,
  .weekly-brand {
    font-size: 16px;
  }

  .weekly-brand {
    gap: 10px;
  }

  .download-image-btn {
    min-height: 52px;
    width: 72%;
    bottom: 28px;
    font-size: 16px;
  }
}

@media (max-width: 360px) {
  :root {
    --safe-x: 16px;
    --mood-icon-size: clamp(40px, 6.8vh, 50px);
  }

  .mood-name {
    font-size: 12px;
  }

  .mood-description {
    display: none;
  }

  .mood-chip.long-label .mood-name {
    font-size: 9px;
  }
}

@media (min-width: 361px) and (max-width: 430px) {
  :root {
    --safe-x: 22px;
    --safe-top: 24px;
    --safe-bottom: 24px;
    --space-2: 12px;
    --major-action-space: 18px;
    --today-control-width: 96%;
  }

  #screen-today h1 {
    font-size: clamp(25px, 7.2vw, 28px);
  }

  .chip-grid {
    gap: 8px 10px;
    margin: 12px auto 12px;
  }

  .mood-chip {
    border-radius: 22px;
    padding: 7px 8px 6px;
  }

  .mood-name {
    font-size: 15px;
  }

  .mood-description {
    font-size: 8px;
  }

  .energy {
    min-height: 38px;
  }

  .reveal-btn {
    width: 76%;
    min-height: 60px;
  }

  .weekly-share-card {
    padding: 30px 30px 118px;
  }

  .weekly-back-btn {
    top: 18px;
    left: 18px;
    width: 40px;
    height: 40px;
    border-radius: 14px;
    font-size: 24px;
  }

  .weekly-content h1 {
    font-size: 27px;
    line-height: 1.08;
  }

  .weekly-vibe-list {
    gap: 12px;
    margin: 26px auto 28px;
    font-size: 34px;
    line-height: 1.04;
  }

  .weekly-strip {
    width: 76%;
    height: 56px;
    margin-bottom: 28px;
    border-radius: 13px;
  }

  .weekly-note {
    gap: 8px;
    margin-bottom: 24px;
  }

  .weekly-note strong {
    font-size: 20px;
  }

  .weekly-note span {
    font-size: 17px;
  }

  .weekly-brand {
    gap: 8px;
    font-size: 16px;
  }

  .weekly-brand img {
    width: 48%;
  }

  .download-image-btn {
    bottom: 28px;
    min-height: 52px;
    width: 70%;
    font-size: 16px;
  }
}
