@font-face {
  font-family: "Creolia";
  src: url("/assets/fonts/Creolia.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inclusive Sans";
  src: url("/assets/fonts/InclusiveSans-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inclusive Sans";
  src: url("/assets/fonts/InclusiveSans-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inclusive Sans";
  src: url("/assets/fonts/InclusiveSans-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inclusive Sans";
  src: url("/assets/fonts/InclusiveSans-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --wheel-size: min(82vw, 308px, 42dvh);
  --olive-950: #223000;
  --olive-900: #223600;
  --olive-800: #35490e;
  --olive-700: #546a1d;
  --olive-600: #777730;
  --olive-500: #95a83e;
  --olive-300: #dddd6b;
  --paper: #ffffff;
  --paper-warm: #fff7e8;
  --paper-soft: #f7f1e6;
  --cream: #fce4c9;
  --orange-600: #f65508;
  --orange-500: #f78731;
  --brown-700: #714633;
  --text-muted: #6e735f;
  --text-soft: #bbb9b4;
  --border-soft: #ece7de;
  --shadow-soft: 0 20px 48px rgba(36, 48, 0, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  min-height: 100dvh;
  background: #ffffff;
  color: var(--olive-900);
  font-family: "Inclusive Sans", sans-serif;
}

body.modal-open {
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

.brand-header {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-header--landing {
  padding: calc(env(safe-area-inset-top, 0px) + 28px) 28px 0;
}

.brand-header--compact {
  padding: calc(env(safe-area-inset-top, 0px) + 26px) 28px 0;
}

.brand-logo {
  display: block;
  width: 112px;
  height: auto;
}

.header-link-button {
  flex: 0 0 auto;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--olive-900);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1.2px;
  text-underline-offset: 2px;
}

.landing-shell {
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: #ffffff;
  padding-bottom: 0;
}

.landing-shell::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: url("/assets/bg-gradiente.png") center top / cover no-repeat;
  transform-origin: 50% 100%;
  transform: translateY(6%) scale(1.06);
  opacity: 0.72;
  will-change: transform, opacity;
  backface-visibility: hidden;
  animation: landing-bg-bloom 1.45s cubic-bezier(0.14, 0.82, 0.16, 1) forwards;
}

.landing-shell::after {
  content: "";
  position: absolute;
  inset: -12% -8% -2% -8%;
  pointer-events: none;
  z-index: 1;
  background: #ffffff;
  border-bottom-left-radius: 48% 11%;
  border-bottom-right-radius: 52% 13%;
  box-shadow: 0 0 28px rgba(255, 255, 255, 0.82);
  transform: translateY(0);
  will-change: transform;
  backface-visibility: hidden;
  animation: landing-white-lift 1.45s cubic-bezier(0.14, 0.82, 0.16, 1) forwards;
}

.landing-hero {
  position: relative;
  z-index: 2;
  flex: 0 0 auto;
  min-height: 266px;
  margin-top: 92px;
  padding: 8px 18px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: hero-reveal 0.9s cubic-bezier(0.22, 0.82, 0.28, 1) 0.06s both;
}

.landing-wheel-art {
  display: block;
  width: min(100%, 292px);
  height: auto;
  object-fit: contain;
  user-select: none;
  filter: drop-shadow(0 30px 24px rgba(25, 36, 2, 0.34));
}

.landing-panel {
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: 0;
  margin-top: 0;
  padding: 16px 28px calc(env(safe-area-inset-bottom, 0px) + 66px);
  border-radius: 0;
  background: transparent;
  color: #ffffff;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 60px;
  animation: panel-rise 0.9s cubic-bezier(0.2, 0.84, 0.22, 1) 0.08s both;
}

.landing-panel::before {
  content: none;
}

.landing-copy-group {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 14px;
}

.feature-icon {
  position: relative;
  z-index: 1;
  display: block;
  width: 44px;
  height: 44px;
}

.feature-icon__image {
  display: block;
  width: 100%;
  height: 100%;
}

.landing-copy {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: none;
  margin-top: 0;
}

.landing-copy h1,
.auth-content h1,
.wheel-copy h1 {
  margin: 0;
  font-family: "Creolia", serif;
  font-weight: 400;
  line-height: 0.98;
  color: inherit;
}

.landing-copy h1 {
  width: 100%;
  font-size: 44px;
  line-height: 0.96;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.landing-copy p {
  margin: 4px 0 0;
  width: 100%;
  max-width: none;
  font-size: 18px;
  line-height: 1.11;
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.96);
}

.cta-button,
.outline-button {
  width: 100%;
  min-height: 58px;
  border-radius: 999px;
  border: 2px solid var(--olive-900);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 28px;
  font-weight: 600;
  font-size: 18px;
  line-height: 1;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition:
    transform 0.18s ease,
    background 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    opacity 0.18s ease;
}

.button-content {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 20px;
}

.button-label {
  display: inline-block;
}

.button-spinner {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: rgba(34, 54, 0, 0.16);
  animation: button-spinner-rotate 0.72s linear infinite;
}

.cta-button {
  position: relative;
  z-index: 1;
  margin-top: auto;
  background: var(--olive-300);
  color: var(--olive-900);
  box-shadow: 0 14px 26px rgba(9, 14, 0, 0.18);
}

.landing-cta {
  margin-top: 0;
  min-height: 62px;
  font-size: 17px;
  box-shadow:
    0 18px 28px rgba(8, 12, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.cta-button:active,
.outline-button:active,
.icon-button:active {
  transform: translateY(1px);
}

.cta-button--large {
  min-height: 62px;
  font-size: 17px;
}

.nav-row {
  padding: calc(env(safe-area-inset-top, 0px) + 24px) 24px 0;
}

.icon-button {
  width: 46px;
  height: 46px;
  display: inline-grid;
  place-items: center;
  border-radius: 15px;
  border: 1.5px solid #ede8df;
  background: #fffdfa;
  color: var(--olive-900);
  box-shadow:
    0 8px 18px rgba(34, 54, 0, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.auth-shell,
.wheel-page {
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 30px);
}

.auth-shell {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.auth-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 18px 24px 0;
}

.auth-content h1 {
  max-width: 320px;
  font-size: 35px;
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--olive-900);
}

.auth-helper {
  margin: 12px 0 0;
  max-width: 316px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.38;
  color: #5d664b;
}

.auth-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  margin-top: 54px;
}

.auth-form--otp {
  margin-top: 40px;
}

.auth-fields {
  display: grid;
  gap: 40px;
}

.ghost-input {
  width: 100%;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
  padding: 4px 0 10px;
  font-size: 27px;
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.02em;
  color: var(--olive-900);
  outline: none;
}

.ghost-input::placeholder {
  color: #cbc7c3;
}

.ghost-input:focus {
  border-bottom-color: rgba(34, 54, 0, 0.24);
}

.ghost-input--otp {
  letter-spacing: 0.06em;
}

.outline-button {
  margin-top: auto;
  min-height: 56px;
  background: #faf9f6;
  color: #c9c6c1;
  border-color: #d3d0ca;
  box-shadow: 0 10px 24px rgba(34, 54, 0, 0.04);
}

.outline-button:not(:disabled) {
  background: var(--olive-300);
  color: var(--olive-900);
  border-color: var(--olive-900);
  box-shadow:
    0 14px 26px rgba(34, 54, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
  cursor: pointer;
}

.cta-button.is-loading,
.outline-button.is-loading {
  opacity: 1;
  cursor: progress;
}

.outline-button.is-loading {
  background: var(--olive-300);
  color: var(--olive-900);
  border-color: var(--olive-900);
  box-shadow:
    0 14px 26px rgba(34, 54, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

.auth-inline-actions {
  padding: 14px 24px 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-inline-actions--otp {
  padding: 14px 0 0;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 8px;
}

.auth-secondary-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--olive-900);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-thickness: 1.2px;
  text-underline-offset: 3px;
}

.auth-secondary-link:disabled {
  opacity: 0.44;
  text-decoration: none;
}

.auth-inline-hint {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.32;
  color: #7f846f;
}

.otp-recaptcha-slot {
  min-height: 1px;
  width: 1px;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
}

.wheel-page {
  display: flex;
  flex-direction: column;
  background: #ffffff;
}

.wheel-copy {
  padding: 18px 28px 0;
}

.wheel-copy-actions {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 16px;
}

.wheel-copy h1 {
  width: 100%;
  max-width: 100%;
  font-size: clamp(36px, 9.8vw, 46px);
  line-height: 0.94;
  letter-spacing: -0.04em;
  color: var(--olive-900);
}

.coins-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 0;
  padding: 8px 12px;
  border-radius: 999px;
  background: #f7f4ef;
  border: 1px solid rgba(34, 54, 0, 0.08);
  font-size: clamp(14px, 4vw, 17px);
  font-weight: 700;
  color: var(--olive-900);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  flex: 0 0 auto;
  min-width: fit-content;
  white-space: nowrap;
}

.coins-pill--button {
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.coins-pill--button:active {
  transform: translateY(1px);
}

.coins-pill span,
.coins-pill strong {
  white-space: nowrap;
}

.coins-pill__icon-image {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.coins-pill.is-highlighted {
  animation: coins-pill-pop 0.8s ease;
}

.coins-help-button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid rgba(34, 54, 0, 0.12);
  border-radius: 999px;
  background: #fffdf8;
  color: var(--olive-900);
  font-size: clamp(10px, 2.9vw, 12px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 8px 18px rgba(34, 45, 0, 0.05);
  white-space: nowrap;
  flex: 1 1 auto;
  min-width: 0;
}

.coins-help-button:active {
  transform: translateY(1px);
}

.wheel-card {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  margin: 18px 20px 0;
  padding: 14px 14px 0;
  border-radius: 24px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background: #ffffff;
  box-shadow:
    0 18px 40px rgba(34, 54, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.wheel-view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

.wheel-mode-bar {
  display: flex;
  justify-content: flex-end;
  padding: 4px 4px 0;
}

.spin-mode-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f8f3ea, #f3eee4);
  border: 1px solid rgba(34, 54, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 10px 18px rgba(34, 45, 0, 0.05);
}

.spin-mode-toggle.is-locked {
  opacity: 0.62;
}

.spin-mode-toggle__track {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
}

.spin-mode-toggle__thumb {
  position: absolute;
  top: 0;
  left: 0;
  width: calc(50% - 2px);
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(180deg, #ffffff, #f7f2e9);
  border: 1px solid rgba(34, 54, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 6px 14px rgba(34, 45, 0, 0.08);
  transform: translateX(0);
  transition: transform 0.22s ease;
}

.spin-mode-toggle[data-selected-mode="cost30"] .spin-mode-toggle__thumb {
  transform: translateX(calc(100% + 4px));
}

.spin-mode-toggle__labels {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(2, minmax(62px, 1fr));
  align-items: center;
}

.spin-mode-toggle__label {
  min-height: 32px;
  padding: 0 14px;
  border: 0;
  background: transparent;
  color: #8f957f;
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  cursor: pointer;
}

.spin-mode-toggle__label.is-active {
  color: var(--olive-900);
}

.spin-mode-toggle__track:disabled,
.spin-mode-toggle__label:disabled {
  cursor: default;
}

.wheel-card.is-result .wheel-view {
  display: none;
}

.wheel-stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 0 12px;
}

.wheel-frame {
  position: relative;
  width: calc(var(--wheel-size) + 18px);
  height: calc(var(--wheel-size) + 34px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  flex: 0 0 auto;
}

.pointer {
  position: absolute;
  top: 0;
  left: 50%;
  width: 34px;
  height: 42px;
  z-index: 4;
  transform: translateX(-50%);
}

.wheel-pointer {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 5px 10px rgba(34, 45, 0, 0.18));
}

.wheel-shell {
  position: relative;
  width: var(--wheel-size);
  height: var(--wheel-size);
  flex: 0 0 auto;
  border-radius: 50%;
  border: 3px solid rgba(34, 45, 0, 0.08);
  background:
    radial-gradient(circle at 32% 25%, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.2) 28%, rgba(34, 45, 0, 0.06) 100%),
    linear-gradient(145deg, #fdfbf6, #ebe6dc);
  padding: 10px;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 24px rgba(34, 45, 0, 0.1);
}

.wheel-face {
  --segment-angle: 51.428571deg;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
  border: 10px solid #ffffff;
  box-shadow:
    inset 0 0 0 2px rgba(34, 45, 0, 0.16),
    inset 0 -16px 24px rgba(34, 45, 0, 0.06);
  transform: rotate(0deg);
  transition: transform 4.2s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 1;
}

.wheel-face::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 28% 18%, rgba(255, 255, 255, 0.22), transparent 20%),
    radial-gradient(circle at 72% 78%, rgba(34, 45, 0, 0.1), transparent 28%);
  pointer-events: none;
}

.wheel-face::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 255, 255, 0) 0 calc(var(--segment-angle) - 2deg),
    rgba(255, 255, 255, 0.94) calc(var(--segment-angle) - 2deg) var(--segment-angle)
  );
  pointer-events: none;
}

.wheel-labels {
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  z-index: 2;
}

.slice-label {
  --angle: 0deg;
  --distance: calc(var(--wheel-size) * 0.31);
  position: absolute;
  top: 50%;
  left: 50%;
  width: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  transform:
    translate(-50%, -50%)
    rotate(var(--angle))
    translateY(calc(var(--distance) * -1))
    rotate(calc(var(--angle) * -1));
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
}

.slice-label.compact {
  width: 82px;
  font-size: 11.4px;
}

.slice-label.dark-text {
  color: var(--olive-900);
}

.slice-label.light-text {
  text-shadow: 0 1px 2px rgba(34, 45, 0, 0.28);
  color: #fffaf2;
}

.center-hub {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 3;
  width: 88px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 7px solid #ffffff;
  background: radial-gradient(circle at 30% 30%, #ffffff 0%, #f7f3eb 78%);
  box-shadow:
    inset 0 0 0 1.6px rgba(34, 45, 0, 0.14),
    0 10px 18px rgba(34, 45, 0, 0.08);
}

.center-hub img {
  width: 46px;
  height: auto;
}

.wheel-actions {
  display: grid;
  gap: 10px;
  padding: 0 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
}

.status-note {
  display: none;
  padding: 11px 12px;
  border-radius: 16px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background: rgba(221, 221, 107, 0.28);
  color: rgba(80, 68, 0, 0.96);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

.status-note.is-visible {
  display: block;
}

.result-view {
  display: none;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 14px;
  padding: 4px 0 calc(env(safe-area-inset-bottom, 0px) + 16px);
}

.wheel-card.is-result .result-view {
  display: flex;
}

.result-head {
  display: grid;
  gap: 8px;
}

.result-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 28px;
  padding: 7px 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(221, 221, 107, 0.56), rgba(252, 228, 201, 0.92));
  border: 1px solid rgba(34, 45, 0, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.72),
    0 8px 16px rgba(34, 45, 0, 0.06);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.result-title {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-family: "Creolia", serif;
  font-size: clamp(30px, 8vw, 34px);
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--olive-900);
}

.result-subtitle {
  margin: 0;
  width: 100%;
  max-width: 100%;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.36;
  color: var(--orange-600);
}

.result-subtitle--highlight {
  display: inline-block;
  width: fit-content;
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 14px;
  background: rgba(246, 85, 8, 0.12);
  border: 1px solid rgba(246, 85, 8, 0.18);
  font-weight: 800;
}

.reward-card {
  position: relative;
  display: grid;
  gap: 12px;
  align-content: start;
  flex: 0 0 auto;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid rgba(246, 85, 8, 0.16);
  background: #ffffff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 24px rgba(34, 45, 0, 0.06);
  overflow: hidden;
}

.reward-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: linear-gradient(180deg, #f65508, #f78731 58%, #dddd6b);
}

.reward-card::after {
  content: "";
  position: absolute;
  top: -42px;
  right: -36px;
  width: 112px;
  height: 112px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(246, 85, 8, 0.18), rgba(246, 85, 8, 0));
  pointer-events: none;
}

.reward-card--consolation {
  border-color: rgba(34, 54, 0, 0.08);
  background: #ffffff;
}

.reward-card--consolation::before {
  background: linear-gradient(180deg, #714633, #777730 58%, #dddd6b);
}

.reward-row {
  position: relative;
  display: block;
  padding-right: 58px;
}

.reward-row.is-hidden,
.result-artwork.is-hidden,
.code-card.is-hidden,
.meta-pills.is-hidden,
.result-subtitle.is-hidden {
  display: none;
}

.reward-label,
.code-card-label {
  display: block;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(34, 54, 0, 0.42);
}

.reward-deal {
  margin: 6px 0 0;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.03em;
}

.reward-detail {
  margin: 8px 0 0;
  padding-right: 6px;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #5f6850;
}

.reward-icon {
  position: absolute;
  top: 2px;
  right: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  border: 1px solid rgba(246, 85, 8, 0.16);
  background: linear-gradient(135deg, rgba(221, 221, 107, 0.56), rgba(255, 255, 255, 0.96));
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 10px 16px rgba(34, 45, 0, 0.08);
}

.reward-icon img {
  width: 20px;
  height: auto;
}

.code-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 18px;
  border: 1px solid rgba(34, 45, 0, 0.12);
  background: linear-gradient(135deg, rgba(34, 45, 0, 0.96), rgba(66, 80, 18, 0.96));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 12px 18px rgba(34, 45, 0, 0.12);
}

.code-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.08) 32%,
    rgba(255, 255, 255, 0) 58%
  );
  transform: translateX(-120%);
  animation: reward-shine 3.6s ease-in-out infinite;
  pointer-events: none;
}

.code-card-label {
  color: rgba(255, 248, 239, 0.72);
}

.code-card-value {
  display: block;
  margin-top: 4px;
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  color: #fffaf2;
}

.copy-button {
  flex: 0 0 auto;
  min-width: 86px;
  min-height: 38px;
  padding: 10px 12px;
  border: 1.5px solid var(--olive-900);
  border-radius: 999px;
  background: var(--olive-300);
  color: var(--olive-900);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.4),
    0 6px 12px rgba(34, 45, 0, 0.12);
}

.meta-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(34, 45, 0, 0.1);
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  color: #5f6850;
}

.result-artwork {
  overflow: hidden;
  border-radius: 18px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background: #ffffff;
}

.result-artwork img {
  display: block;
  width: 100%;
  height: auto;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  align-items: end;
  padding: calc(env(safe-area-inset-top, 0px) + 16px) 14px calc(env(safe-area-inset-bottom, 0px) + 14px);
  background: rgba(18, 24, 2, 0.42);
  backdrop-filter: blur(10px);
  animation: modal-overlay-in 0.2s ease both;
}

.modal-overlay[hidden] {
  display: none;
}

.modal-sheet {
  width: min(100%, 430px);
  max-height: min(92dvh, 860px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  border-radius: 30px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background:
    radial-gradient(circle at top right, rgba(221, 221, 107, 0.18), transparent 28%),
    linear-gradient(180deg, #fffdfa 0%, #f8f3ea 100%);
  box-shadow:
    0 26px 56px rgba(10, 15, 0, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
  overflow: hidden;
  animation: modal-sheet-in 0.24s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.modal-sheet--history {
  height: min(92dvh, 820px);
  max-height: min(92dvh, 820px);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 18px 0;
}

.modal-eyebrow {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(221, 221, 107, 0.18);
  border: 1px solid rgba(34, 54, 0, 0.08);
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #777730;
}

.modal-close-button {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 14px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background: rgba(255, 255, 255, 0.9);
  color: var(--olive-900);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 8px 18px rgba(34, 45, 0, 0.06);
}

.modal-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 10px 18px 18px;
}

.modal-content--history {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}

.modal-title {
  margin: 0;
  font-family: "Creolia", serif;
  font-size: 24px;
  line-height: 0.96;
  letter-spacing: -0.04em;
  color: var(--olive-900);
}

.modal-copy {
  margin: 10px 0 0;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.42;
  color: #5d664b;
}

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

.modal-step-card {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(34, 54, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 20px rgba(34, 45, 0, 0.04);
}

.modal-step-index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(180deg, #dddd6b, #f7d46a);
  border: 1px solid rgba(34, 54, 0, 0.12);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  color: var(--olive-900);
}

.modal-step-card h3 {
  margin: 1px 0 0;
  font-size: 16px;
  font-weight: 800;
  line-height: 1.16;
  color: var(--olive-900);
}

.modal-step-card p {
  margin: 6px 0 0;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.35;
  color: #667055;
}

.modal-note {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(252, 228, 201, 0.42);
  border: 1px solid rgba(34, 54, 0, 0.08);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.38;
  color: #6a644b;
}

.modal-cta {
  width: auto;
  max-width: calc(100% - 36px);
  margin: 0 18px calc(env(safe-area-inset-bottom, 0px) + 18px);
  min-height: 60px;
  align-self: stretch;
}

.history-balance-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at top right, rgba(221, 221, 107, 0.28), transparent 36%),
    linear-gradient(180deg, #fffef9, #f8f3ea);
  border: 1px solid rgba(34, 54, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 18px rgba(34, 45, 0, 0.05);
}

.history-balance-label {
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #777730;
}

#movementsBalanceValue {
  font-size: 24px;
  font-weight: 800;
  line-height: 1;
  color: var(--olive-900);
}

.history-loading-state,
.history-empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 88px;
  margin-top: 14px;
  padding: 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(34, 54, 0, 0.08);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  color: #667055;
}

.history-loading-spinner {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid currentColor;
  border-right-color: transparent;
  border-bottom-color: rgba(34, 54, 0, 0.16);
  animation: button-spinner-rotate 0.72s linear infinite;
}

.history-list {
  flex: 1 1 auto;
  display: grid;
  gap: 10px;
  margin-top: 14px;
  padding-right: 4px;
  padding-bottom: 2px;
  overflow: auto;
  min-height: 0;
}

.history-item {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(34, 54, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    0 10px 20px rgba(34, 45, 0, 0.04);
}

.history-item__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background: linear-gradient(160deg, #fff7e8, #f1ebd7);
  font-size: 18px;
}

.history-item__copy {
  min-width: 0;
}

.history-item__reason {
  margin: 0;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.22;
  color: var(--olive-900);
}

.history-item__meta {
  margin: 5px 0 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.28;
  color: #7a816c;
}

.history-item__amount {
  text-align: right;
  font-size: 16px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
}

.history-item__amount.is-positive {
  color: #3f7d1a;
}

.history-item__amount.is-negative {
  color: #a04e1f;
}

.toast-region {
  position: fixed;
  right: 14px;
  left: 14px;
  top: calc(env(safe-area-inset-top, 0px) + 14px);
  display: grid;
  gap: 10px;
  z-index: 60;
  pointer-events: none;
}

.toast {
  width: min(100%, 390px);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 22px;
  border: 1px solid rgba(34, 54, 0, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 241, 230, 0.98));
  color: var(--olive-900);
  box-shadow:
    0 18px 30px rgba(10, 15, 0, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.96);
  opacity: 0;
  transform: translateY(-10px);
  animation: toast-in 0.22s ease forwards;
  overflow: hidden;
  position: relative;
}

.toast::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 22px;
  background: linear-gradient(180deg, #dddd6b, #f78731);
}

.toast__art {
  position: relative;
  width: 54px;
  height: 54px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 58%),
    linear-gradient(160deg, #fff7e8, #f2ecd9);
  border: 1px solid rgba(34, 54, 0, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.84),
    0 10px 18px rgba(34, 45, 0, 0.08);
}

.toast__art svg {
  width: 38px;
  height: 38px;
  display: block;
}

.toast__copy {
  min-width: 0;
}

.toast__title {
  margin: 0;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #777730;
}

.toast__message {
  margin: 5px 0 0;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.22;
  letter-spacing: -0.01em;
  color: var(--olive-900);
}

.toast--success {
  background:
    linear-gradient(180deg, rgba(255, 253, 248, 0.98), rgba(247, 241, 230, 0.98));
}

.toast--warning {
  background:
    linear-gradient(180deg, rgba(255, 247, 239, 0.98), rgba(251, 232, 217, 0.98));
}

.toast--warning::before {
  background: linear-gradient(180deg, #f78731, #714633);
}

.toast--warning .toast__art {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.18) 58%),
    linear-gradient(160deg, #fff0e3, #f6dbc8);
}

.toast--warning .toast__title {
  color: #9a643d;
}

.toast--warning .toast__message {
  color: #5f3c27;
}

.toast--coins::before {
  background: linear-gradient(180deg, #dddd6b, #f65508);
}

.toast--coins .toast__art {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.22) 56%),
    linear-gradient(160deg, #fff6df, #f6ecd0);
}

.toast--retry::before {
  background: linear-gradient(180deg, #f78731, #dddd6b);
}

.toast--retry .toast__art {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.22) 56%),
    linear-gradient(160deg, #fff5e8, #f4ebd7);
}

.toast--retry .toast__title {
  color: #8a6a21;
}

.toast--copy::before {
  background: linear-gradient(180deg, #dddd6b, #777730);
}

.toast--copy .toast__art {
  background:
    radial-gradient(circle at 30% 30%, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.2) 56%),
    linear-gradient(160deg, #f9f6ea, #ece6d4);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

.confetti-piece {
  position: absolute;
  left: 0;
  top: -10vh;
  border-radius: 4px;
  box-shadow: 0 6px 10px rgba(34, 45, 0, 0.12);
  transform: translate3d(0, 0, 0) rotate(0deg);
  animation: confetti-fall var(--duration, 2.4s) linear var(--delay, 0s) forwards;
}

@keyframes toast-in {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

  to {
    opacity: 1;
  }
}

@keyframes modal-sheet-in {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes landing-bg-bloom {
  0% {
    opacity: 0.5;
    transform: translateY(8%) scale(1.05);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes landing-white-lift {
  0% {
    transform: translateY(0) scaleX(1.03);
    border-bottom-left-radius: 47% 11%;
    border-bottom-right-radius: 53% 12%;
  }

  100% {
    transform: translateY(-113%) scaleX(1);
    border-bottom-left-radius: 50% 12%;
    border-bottom-right-radius: 50% 12%;
  }
}

@keyframes panel-rise {
  0% {
    opacity: 0;
    transform: translateY(52px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes hero-reveal {
  0% {
    opacity: 0;
    transform: translateY(24px) scale(0.96);
  }

  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes button-spinner-rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@keyframes reward-shine {
  0% {
    transform: translateX(-120%);
  }

  55% {
    transform: translateX(120%);
  }

  100% {
    transform: translateX(120%);
  }
}

@keyframes coins-pill-pop {
  0% {
    transform: scale(1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }

  38% {
    transform: scale(1.05);
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.82),
      0 10px 24px rgba(221, 221, 107, 0.34);
  }

  100% {
    transform: scale(1);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
  }
}

@keyframes confetti-fall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(var(--rotate-start, 0deg));
  }

  25% {
    transform: translate3d(calc(var(--drift, 0px) * 0.4), 24vh, 0)
      rotate(calc((var(--rotate-start, 0deg) + var(--rotate-end, 260deg)) * 0.4));
  }

  55% {
    transform: translate3d(calc(var(--drift, 0px) * -0.25), 58vh, 0)
      rotate(calc((var(--rotate-start, 0deg) + var(--rotate-end, 260deg)) * 0.72));
  }

  100% {
    transform: translate3d(var(--drift, 0px), 118vh, 0) rotate(var(--rotate-end, 260deg));
  }
}

@media (max-width: 390px) {
  :root {
    --wheel-size: min(82vw, 294px, 40dvh);
  }

  .landing-hero {
    min-height: 252px;
    margin-top: 84px;
  }

  .landing-copy h1,
  .auth-content h1,
  .wheel-copy h1 {
    font-size: 40px;
  }

  .landing-copy h1 {
    font-size: 42px;
  }

  .auth-content h1 {
    font-size: 35px;
  }

  .landing-copy p {
    font-size: 18px;
  }

  .landing-wheel-art {
    width: min(100%, 286px);
  }

  .wheel-stage {
    min-height: 286px;
  }

  .result-title {
    font-size: 30px;
  }

  .ghost-input {
    font-size: 26px;
  }
}

@media (max-width: 360px) {
  :root {
    --wheel-size: min(84vw, 280px, 39dvh);
  }

  .landing-hero {
    min-height: 238px;
    margin-top: 76px;
  }

  .brand-header--landing,
  .brand-header--compact,
  .wheel-copy,
  .auth-content,
  .nav-row {
    padding-left: 22px;
    padding-right: 22px;
  }

  .landing-panel {
    padding-left: 22px;
    padding-right: 22px;
  }

  .landing-copy h1,
  .auth-content h1,
  .wheel-copy h1 {
    font-size: 36px;
  }

  .landing-copy h1 {
    font-size: 39px;
  }

  .auth-content h1 {
    font-size: 33px;
  }

  .landing-panel {
    padding-top: 14px;
    padding-bottom: calc(env(safe-area-inset-bottom, 0px) + 52px);
  }

  .wheel-card {
    margin-left: 16px;
    margin-right: 16px;
    padding-left: 12px;
    padding-right: 12px;
  }

  .wheel-actions {
    padding-left: 0;
    padding-right: 0;
  }

  .result-title {
    font-size: 28px;
  }

  .cta-button,
  .outline-button {
    min-height: 56px;
    font-size: 16px;
  }
}
