:root {
  color-scheme: light;
  --bg: oklch(98% 0.012 8);
  --panel: oklch(99% 0.006 20);
  --text: oklch(22% 0.018 25);
  --muted: oklch(47% 0.018 25);
  --line: oklch(88% 0.018 18);
  --accent: oklch(75% 0.09 4);
  --accent-strong: oklch(46% 0.06 8);
  --focus: oklch(62% 0.1 20);
  --shadow: 0 24px 70px oklch(37% 0.03 20 / 14%);
  font-family: "Cairo", "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, oklch(99% 0.012 10), var(--bg) 42%, oklch(96% 0.018 25));
  color: var(--text);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.38;
}

#app {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

#app:has(.welcome-shell) {
  padding: 0;
  place-items: stretch;
}

.quiz-shell {
  width: min(1120px, 100%);
  min-height: auto;
  display: grid;
  grid-template-rows: auto auto auto auto;
  gap: 16px;
  padding: 22px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.site-header,
.actions {
  display: grid;
  align-items: center;
}

.site-header {
  grid-template-columns: minmax(72px, 1fr) 176px minmax(72px, 1fr);
  grid-template-rows: auto auto;
  gap: 14px 20px;
}

.site-logo {
  grid-column: 2;
  grid-row: 1;
  width: 176px;
  height: auto;
  display: block;
  justify-self: center;
}

.header-back {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.header-restart {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.site-header > .progress {
  grid-column: 1 / -1;
  grid-row: 2;
  width: 100%;
}

.site-header--brand-only {
  min-height: 84px;
  padding: 12px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--panel);
}

.site-header--brand-only .site-logo {
  width: 184px;
}

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

.actions {
  display: flex;
  justify-content: center;
}

.progress {
  height: 9px;
  overflow: hidden;
  background: oklch(92% 0.013 15);
  border-radius: 999px;
}

.progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
  border-radius: inherit;
  transition: width 180ms ease-out;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  min-height: 44px;
}

.auth-panel.signed-in {
  justify-self: end;
  max-width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(98.5% 0.006 20);
  flex-wrap: wrap;
}

.auth-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  overflow: hidden;
  flex: 0 0 auto;
  background: var(--text);
  color: oklch(98% 0.006 20);
  font-weight: 800;
}

.auth-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.auth-panel div:not(#google-signin) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.auth-panel strong,
.auth-panel span {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.auth-panel strong {
  font-size: 0.92rem;
}

.auth-panel span,
.auth-hint {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-hint {
  margin: 0;
}

.auth-error {
  flex-basis: 100%;
  color: oklch(48% 0.15 30);
  font-size: 0.82rem;
  line-height: 1.5;
}

.icon-button,
.link-button {
  min-height: 40px;
  border: 1px solid var(--line);
  background: oklch(98% 0.006 20);
  color: var(--text);
}

.icon-button {
  width: 44px;
  border-radius: 50%;
  font-size: 30px;
  line-height: 1;
}

.link-button {
  border-radius: 8px;
  padding: 0 18px;
}

.welcome-shell {
  position: relative;
  direction: ltr;
  width: 100%;
  min-height: 100vh;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(390px, 23.5vw);
  min-height: 0;
  align-items: stretch;
  gap: 0;
  padding: 0;
}

.cover-frame {
  aspect-ratio: auto;
  width: 100%;
  height: 100%;
  max-height: none;
  overflow: hidden;
  border-radius: 0;
  background: oklch(97% 0.006 20);
}

.cover-frame img,
.image-option img {
  width: 100%;
  height: 100%;
  display: block;
}

.cover-frame img {
  object-fit: cover;
  object-position: center top;
}

.image-option img {
  object-fit: cover;
}

.welcome-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  direction: rtl;
  max-width: 1060px;
  padding: 8vh 48px 9vh 40px;
  text-align: center;
  align-self: stretch;
}

.logo {
  width: min(180px, 48vw);
  height: auto;
  margin-bottom: 26px;
}

h1 {
  margin: 0;
  font-size: 2.25rem;
  line-height: 1.2;
  letter-spacing: 0;
}

p {
  margin: 0;
  color: var(--muted);
  line-height: 1.8;
}

.welcome-copy p,
.question-heading p,
.result-copy {
  max-width: 66ch;
  margin-top: 16px;
  font-size: 1.02rem;
}

.welcome-copy h1 {
  max-width: 850px;
  font-size: 4.25rem;
  line-height: 1.08;
  font-weight: 800;
}

.welcome-copy p {
  max-width: 930px;
  margin-top: 28px;
  color: oklch(42% 0.018 25);
  font-size: 1.48rem;
  line-height: 1.35;
}

.question {
  align-self: start;
  padding: 10px 28px 4px;
}

.question-heading {
  margin-bottom: 18px;
}

.eyebrow {
  color: var(--accent-strong);
  font-weight: 700;
  margin-bottom: 10px;
}

.options {
  display: grid;
  gap: 14px;
}

.image-grid {
  grid-template-columns: repeat(5, minmax(138px, 1fr));
}

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

.option {
  min-height: 76px;
  text-align: start;
  border: 1px solid var(--line);
  background: oklch(98.5% 0.006 20);
  color: var(--text);
  border-radius: 8px;
  padding: 16px;
  transition: transform 160ms ease-out, border-color 160ms ease-out, background 160ms ease-out;
}

.option:hover {
  transform: translateY(-1px);
  border-color: oklch(78% 0.04 15);
}

.option:focus-visible,
.primary-button:focus-visible,
.icon-button:focus-visible,
.link-button:focus-visible,
.text-input:focus {
  outline: 3px solid oklch(82% 0.08 20 / 58%);
  outline-offset: 2px;
}

.option.selected {
  border-color: var(--accent-strong);
  background: oklch(96% 0.035 10);
}

.image-option {
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.image-option img {
  aspect-ratio: 1 / 1.05;
}

.option-copy {
  display: grid;
  gap: 5px;
}

.image-option .option-copy {
  padding: 13px;
}

.option strong {
  font-size: 1rem;
  line-height: 1.45;
}

.option small {
  color: var(--muted);
  line-height: 1.55;
}

.text-input {
  width: min(440px, 100%);
  height: 56px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 18px;
  color: var(--text);
  background: oklch(99% 0.005 20);
}

.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: min(360px, 100%);
  min-height: 56px;
  border: 0;
  border-radius: 8px;
  padding: 0 28px;
  background: var(--text);
  color: oklch(98% 0.006 20);
  text-decoration: none;
  font-weight: 800;
  transition: transform 160ms ease-out, background 160ms ease-out;
}

.primary-button:hover {
  transform: translateY(-1px);
  background: oklch(30% 0.026 24);
}

.welcome-shell .welcome-start {
  width: auto;
  min-width: 430px;
  min-height: 104px;
  margin-top: 50px;
  border-radius: 999px;
  padding: 0 56px;
  background: oklch(32% 0.004 25);
  font-size: 1.32rem;
  line-height: 1.18;
}

.result-shell {
  min-height: auto;
}

.auth-gate-shell {
  min-height: auto;
}

.auth-gate {
  place-self: center;
  width: min(560px, 100%);
  padding: 24px 0 18px;
  text-align: center;
}

.auth-gate .logo {
  margin-inline: auto;
}

.auth-gate h1 {
  margin-bottom: 14px;
}

.auth-gate > p:not(.eyebrow) {
  max-width: 48ch;
  margin: 0 auto 26px;
}

.auth-gate .auth-panel {
  justify-content: center;
}

.auth-gate #google-signin {
  min-height: 44px;
}

.result {
  place-self: start center;
  width: min(680px, 100%);
  padding-top: 0;
  text-align: center;
}

.result .logo {
  margin-inline: auto;
}

.tips {
  display: grid;
  gap: 12px;
  margin: 28px 0;
  text-align: start;
}

.routine-card {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 22px;
  align-items: center;
  margin: 28px 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(98.5% 0.01 16);
  text-align: start;
}

.routine-card img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  border-radius: 8px;
  background: oklch(96% 0.012 16);
}

.routine-card h2 {
  margin: 0 0 10px;
  font-size: 1.32rem;
  line-height: 1.35;
  letter-spacing: 0;
}

.routine-card .eyebrow {
  margin-bottom: 6px;
}

.routine-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
}

.routine-meta span,
.routine-meta strong {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border-radius: 999px;
  padding: 0 14px;
  background: oklch(95% 0.025 12);
  color: var(--text);
}

.tips p {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(98% 0.01 16);
}

.wheel-shell {
  --wheel-rose: oklch(78% 0.075 8);
  --wheel-rose-deep: oklch(48% 0.065 10);
  --wheel-blush: oklch(91.5% 0.04 12);
  --wheel-cream: oklch(96.5% 0.018 52);
  --wheel-sand: oklch(90% 0.028 58);
  --wheel-ink: oklch(25% 0.022 22);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 16% 14%, oklch(92% 0.04 8 / 62%), transparent 30%),
    radial-gradient(circle at 88% 86%, oklch(91% 0.03 55 / 52%), transparent 28%),
    linear-gradient(145deg, oklch(99% 0.008 20), oklch(96.5% 0.022 12));
  border-color: oklch(88% 0.025 14);
}

.wheel-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 9% 20%, oklch(75% 0.06 8 / 16%) 0 5px, transparent 6px),
    radial-gradient(circle at 91% 28%, oklch(82% 0.055 70 / 20%) 0 4px, transparent 5px),
    radial-gradient(circle at 84% 82%, oklch(75% 0.06 8 / 12%) 0 7px, transparent 8px);
  pointer-events: none;
  z-index: 0;
}

.wheel-shell .site-header {
  position: relative;
  z-index: 1;
}

.wheel-shell .icon-button,
.wheel-shell .link-button {
  background: oklch(99% 0.006 20);
  border-color: var(--line);
  color: var(--text);
}

.wheel-shell .icon-button:hover,
.wheel-shell .link-button:hover {
  background: oklch(96.5% 0.025 12);
  border-color: oklch(78% 0.055 10);
}

.wheel-shell .progress {
  background: oklch(92% 0.013 15);
}

.wheel-shell .progress span {
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.wheel-stage {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 4px 6px 10px;
  text-align: center;
}

.wheel-stage .logo {
  display: none;
}

.wheel-stage h1 {
  color: var(--text);
}

.wheel-stage .eyebrow {
  color: var(--accent-strong);
}

.wheel-layout {
  display: grid;
  grid-template-columns: minmax(300px, 460px) minmax(260px, 1fr);
  align-items: center;
  gap: 34px;
  margin-top: 28px;
  text-align: start;
}

.wheel-wrap {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  justify-self: center;
  display: grid;
  place-items: center;
  isolation: isolate;
}

.wheel-wrap::before {
  content: "";
  position: absolute;
  inset: -12px;
  border-radius: 50%;
  background: var(--wheel-sand);
  border: 1px solid oklch(78% 0.03 55 / 48%);
  box-shadow:
    0 22px 55px oklch(38% 0.035 18 / 18%),
    0 5px 18px oklch(48% 0.065 10 / 14%);
  z-index: -2;
}

.wheel-wrap::after {
  content: "";
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid oklch(76% 0.05 68 / 55%);
  z-index: -1;
}

.fortune-wheel {
  --wheel-rotation: 0deg;
  --spin-duration: 6200ms;
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  border: 5px solid var(--wheel-rose-deep);
  background:
    conic-gradient(
      from -25.714286deg,
      var(--wheel-rose) 0deg 51.428571deg,
      var(--wheel-blush) 51.428571deg 102.857143deg,
      var(--wheel-sand) 102.857143deg 154.285714deg,
      var(--wheel-cream) 154.285714deg 205.714286deg,
      var(--wheel-rose) 205.714286deg 257.142857deg,
      var(--wheel-blush) 257.142857deg 308.571429deg,
      var(--wheel-sand) 308.571429deg 360deg
    );
  box-shadow:
    inset 0 0 0 2px oklch(99% 0.006 20 / 45%),
    inset 0 0 34px oklch(38% 0.035 18 / 10%);
  transform: rotate(var(--wheel-rotation));
}

.fortune-wheel.is-spinning {
  transition: transform var(--spin-duration) cubic-bezier(0.16, 1, 0.3, 1);
}

.wheel-label {
  position: absolute;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 34px;
  transform: rotate(var(--slice-angle));
  pointer-events: none;
}

.wheel-label b {
  width: 29%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  color: var(--wheel-ink);
  font-size: 0.8rem;
  line-height: 1.3;
  font-weight: 800;
  text-align: center;
  overflow-wrap: normal;
  transform: rotate(var(--label-angle));
}

.fortune-wheel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-conic-gradient(
      from -25.714286deg,
      transparent 0deg,
      transparent 50.828571deg,
      oklch(48% 0.065 10 / 18%) 50.828571deg,
      oklch(48% 0.065 10 / 18%) 51.428571deg
    );
  pointer-events: none;
  z-index: 1;
}

.center-logo {
  display: block;
  width: 86%;
  height: auto;
  object-fit: contain;
}

.wheel-center {
  position: absolute;
  width: 108px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 3px solid var(--wheel-rose-deep);
  background: var(--panel);
  color: var(--wheel-ink);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.5px;
  box-shadow:
    0 10px 28px oklch(38% 0.035 18 / 20%),
    inset 0 0 0 4px oklch(94% 0.025 12);
  z-index: 2;
}

.wheel-pointer {
  position: absolute;
  top: -22px;
  left: 50%;
  width: 0;
  height: 0;
  border-left: 13px solid transparent;
  border-right: 13px solid transparent;
  border-top: 40px solid var(--wheel-rose-deep);
  filter:
    drop-shadow(0 5px 7px oklch(38% 0.035 18 / 28%));
  transform: translateX(-50%);
  transform-origin: 50% 100%;
  z-index: 3;
  will-change: transform;
  animation: pointer-float 1.6s cubic-bezier(0.16, 1, 0.3, 1) infinite alternate;
}

.wheel-pointer::after {
  content: "";
  position: absolute;
  top: -4px;
  left: -7px;
  width: 0;
  height: 0;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
  border-top: 26px solid oklch(94% 0.03 12 / 34%);
  pointer-events: none;
}

@keyframes pointer-float {
  from {
    transform: translateX(-50%) translateY(-3px) scale(0.98);
  }
  to {
    transform: translateX(-50%) translateY(4px) scale(1.02);
  }
}

.wheel-copy {
  display: grid;
  gap: 16px;
  align-content: center;
  justify-items: start;
}

.wheel-copy h2 {
  margin: 0;
  font-size: 1.35rem;
  line-height: 1.35;
  color: var(--text);
  letter-spacing: 0;
}

.wheel-copy p {
  max-width: 46ch;
  color: var(--muted);
}

.spin-button {
  min-width: min(300px, 100%);
  background: var(--text);
  color: oklch(98% 0.006 20);
  font-size: 1.1rem;
  box-shadow: 0 12px 28px oklch(38% 0.035 18 / 18%);
  border-radius: 8px;
}

.spin-button:hover {
  background: oklch(30% 0.026 24);
  box-shadow: 0 15px 34px oklch(38% 0.035 18 / 22%);
  transform: translateY(-1px);
}

.spin-button:disabled {
  transform: none;
}

.wheel-error {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid oklch(72% 0.12 25 / 45%);
  border-radius: 8px;
  background: oklch(96% 0.025 25);
  color: oklch(46% 0.13 25);
}

.prize-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: oklch(22% 0.018 25 / 44%);
  animation: overlay-in 220ms ease-out;
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.prize-popup {
  position: relative;
  width: min(500px, 100%);
  display: grid;
  gap: 16px;
  padding: 36px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  box-shadow: 0 30px 80px oklch(30% 0.03 20 / 30%);
  text-align: center;
  outline: none;
  animation: popup-in 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes popup-in {
  from { opacity: 0; transform: scale(0.96) translateY(16px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.prize-kicker {
  color: var(--accent-strong);
  font-weight: 800;
  font-size: 1rem;
}

.prize-popup h2 {
  margin: 0;
  color: var(--text);
  font-size: 1.8rem;
  line-height: 1.3;
  letter-spacing: 0;
}

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

.voucher-details {
  display: grid;
  gap: 10px;
  margin: 0;
  text-align: start;
}

.voucher-details div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: oklch(97% 0.018 12);
}

.voucher-details dt {
  color: var(--muted);
  font-size: 0.88rem;
}

.voucher-details dd {
  margin: 0;
  color: var(--accent-strong);
  font-weight: 800;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.result-button {
  margin-inline: auto;
  background: var(--text);
  color: oklch(98% 0.006 20);
  border-radius: 8px;
}

.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  min-width: min(360px, 100%);
  margin-inline: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 24px;
  background: oklch(99% 0.006 20);
  color: var(--text);
  font-weight: 700;
  transition: background 160ms ease-out, transform 160ms ease-out;
}

.secondary-button:hover {
  background: oklch(96.5% 0.025 12);
  border-color: oklch(78% 0.055 10);
  transform: translateY(-1px);
}

.confetti {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.confetti i {
  position: absolute;
  top: -20px;
  left: var(--x);
  width: 10px;
  height: 18px;
  background: var(--confetti);
  opacity: 0;
  border-radius: 2px;
  animation: confetti-fall 1800ms ease-out var(--delay) forwards;
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -12px, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 1;
  }
  100% {
    transform: translate3d(24px, 100vh, 0) rotate(260deg);
    opacity: 0;
  }
}

.shake {
  animation: shake 220ms ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  35% { transform: translateX(8px); }
  70% { transform: translateX(-8px); }
}

@media (max-width: 980px) {
  #app {
    padding: 12px;
  }

  .quiz-shell {
    min-height: auto;
    padding: 16px;
    gap: 14px;
  }

  .welcome {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 0;
  }

  .welcome-shell {
    min-height: calc(100vh - 24px);
    padding: 0;
    gap: 0;
  }

  .welcome-shell .welcome {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .cover-frame {
    max-height: 42vh;
  }

  .welcome-shell .cover-frame {
    order: -1;
    height: 42vh;
    max-height: none;
  }

  .welcome-copy {
    padding-top: 0;
  }

  .welcome-shell .welcome-copy {
    padding: 40px 28px 48px;
  }

  .welcome-copy h1 {
    font-size: 2.45rem;
    line-height: 1.14;
  }

  .welcome-copy p {
    font-size: 1.12rem;
    line-height: 1.55;
  }

  .welcome-shell .welcome-start {
    width: 100%;
    max-width: 430px;
    min-width: 0;
    min-height: 72px;
    margin-top: 34px;
    font-size: 1.08rem;
  }

  .question {
    padding: 8px 0;
  }

  h1 {
    font-size: 1.7rem;
  }

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

  .wheel-layout {
    grid-template-columns: 1fr;
    gap: 26px;
    text-align: center;
  }

  .wheel-wrap {
    width: min(100%, 380px);
  }

  .wheel-copy {
    justify-items: center;
  }

  .wheel-copy p {
    color: var(--muted);
  }
}

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: minmax(56px, 1fr) 132px minmax(56px, 1fr);
    gap: 11px 9px;
  }

  .site-logo,
  .site-header--brand-only .site-logo {
    width: 132px;
  }

  .site-header--brand-only {
    min-height: 70px;
    padding: 9px 14px;
  }

  .icon-button {
    width: 40px;
  }

  .link-button {
    padding: 0 10px;
  }

  .auth-panel {
    justify-content: stretch;
  }

  .auth-panel.signed-in {
    justify-self: stretch;
  }

  .auth-panel strong,
  .auth-panel span {
    max-width: 160px;
  }

  .image-grid,
  .text-grid {
    grid-template-columns: 1fr;
  }

  .image-option {
    display: grid;
    grid-template-columns: 116px 1fr;
    align-items: center;
  }

  .image-option img {
    aspect-ratio: 1;
  }

  .primary-button {
    width: 100%;
  }

  .welcome-shell .cover-frame {
    height: 38vh;
  }

  .welcome-shell .welcome-copy {
    padding: 30px 20px 36px;
  }

  .welcome-shell .welcome-copy h1,
  .welcome-shell .welcome-copy p {
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .welcome-shell .welcome-copy h1 {
    font-size: 2rem;
  }

  .welcome-shell .welcome-copy p {
    margin-top: 18px;
    font-size: 1rem;
  }

  .result {
    padding-top: 4px;
  }

  .routine-card {
    grid-template-columns: 1fr;
  }

  .routine-card img {
    max-height: 240px;
  }

  .wheel-shell {
    padding-inline: 12px;
    padding-bottom: 20px;
  }

  .wheel-stage {
    padding-inline: 0;
  }

  .wheel-layout {
    margin-top: 22px;
  }

  .wheel-wrap {
    width: min(100%, 304px);
  }

  .wheel-wrap::before {
    inset: -8px;
  }

  .fortune-wheel {
    border-width: 4px;
  }

  .wheel-label {
    padding-top: 26px;
  }

  .wheel-label b {
    width: 30%;
    min-height: 42px;
    font-size: 0.72rem;
    line-height: 1.25;
  }

  .wheel-center {
    width: 82px;
  }

  .wheel-pointer {
    top: -22px;
    border-left-width: 14px;
    border-right-width: 14px;
    border-top-width: 30px;
  }

  .wheel-pointer::after {
    top: -3px;
    left: -6px;
    border-left-width: 6px;
    border-right-width: 6px;
    border-top-width: 19px;
  }

  .prize-popup {
    padding: 26px 18px;
  }

  .prize-popup h2 {
    font-size: 1.42rem;
  }

  .voucher-details div {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .fortune-wheel.is-spinning {
    transition-duration: 600ms !important;
  }

  .prize-overlay,
  .prize-popup,
  .confetti i,
  .wheel-pointer,
  .shake {
    animation: none;
  }
}
