:root {
  --espresso: #1a1208;
  --walnut: #231a0e;
  --bark: #2e2014;
  --surface: #38271a;
  --surface-2: #42301f;
  --terra: #c4643a;
  --terra-light: #d9865a;
  --cream: #f7f0e6;
  --cream-dim: rgba(247, 240, 230, 0.68);
  --cream-faint: rgba(247, 240, 230, 0.28);
  --cream-ghost: rgba(247, 240, 230, 0.12);
  --danger: #8a5041;
  --shadow: rgba(0, 0, 0, 0.42);
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: #110d08;
  color: var(--cream);
  font-family: "DM Sans", system-ui, sans-serif;
  letter-spacing: 0;
}

button,
input,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.app-shell {
  width: 100%;
  min-height: 100svh;
  background:
    radial-gradient(circle at 84% 8%, rgba(196, 100, 58, 0.12), transparent 32%),
    linear-gradient(180deg, var(--walnut), var(--espresso) 58%, #120d07);
  overflow: hidden;
}

.screen {
  min-height: 100svh;
  position: relative;
  padding: max(22px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
}

.screen.image-screen {
  padding: max(18px, env(safe-area-inset-top)) 18px max(20px, env(safe-area-inset-bottom));
  background: var(--espresso);
}

.hero-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.96) contrast(1.03);
}

.photo-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(26, 18, 8, 0.52), transparent 30%, rgba(26, 18, 8, 0.22) 50%, rgba(26, 18, 8, 0.96) 100%),
    radial-gradient(circle at 88% 46%, rgba(196, 100, 58, 0.2), transparent 34%);
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 42px;
}

.brand {
  font-family: "Lora", serif;
  font-size: 21px;
  font-style: italic;
  color: var(--cream);
  white-space: nowrap;
}

.brand span {
  color: var(--terra-light);
}

.counter,
.step-label,
.small-label {
  color: var(--terra-light);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pill,
.icon-button,
.ghost-button,
.option-card,
.chip,
.answer-button,
.rating-star {
  border: 1px solid var(--cream-ghost);
  background: rgba(56, 39, 26, 0.68);
  color: var(--cream);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.pill {
  min-height: 36px;
  padding: 0 13px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--cream-dim);
  font-size: 12px;
}

.pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--terra);
}

.icon-button {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  padding: 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  margin-top: auto;
  padding-bottom: 4px;
}

h1,
h2,
.restaurant-name {
  margin: 0;
  font-family: "Lora", serif;
  font-style: italic;
  font-weight: 400;
  letter-spacing: 0;
}

h1 {
  font-size: clamp(38px, 12vw, 54px);
  line-height: 0.98;
}

h2 {
  font-size: clamp(31px, 9vw, 42px);
  line-height: 1.04;
}

p {
  margin: 0;
  color: var(--cream-dim);
  line-height: 1.45;
}

.lead {
  margin-top: 12px;
  font-size: 15px;
  max-width: 32rem;
}

.tap-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 22px;
}

.tap-actions.three {
  grid-template-columns: 1fr 1fr 1fr;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 54px;
  border-radius: 18px;
  border: 0;
  padding: 0 18px;
  color: var(--cream);
  font-weight: 700;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

.primary-button {
  background: linear-gradient(135deg, var(--terra), var(--terra-light));
}

.secondary-button {
  background: rgba(247, 240, 230, 0.12);
  border: 1px solid var(--cream-ghost);
}

.danger-button {
  background: rgba(103, 68, 54, 0.82);
  border: 1px solid rgba(247, 240, 230, 0.1);
}

.full-button {
  width: 100%;
  margin-top: 18px;
}

.location-screen {
  justify-content: center;
}

.welcome-screen,
.auth-screen {
  justify-content: space-between;
}

.welcome-screen {
  text-align: center;
}

.welcome-mark {
  display: grid;
  gap: 14px;
  place-items: center;
  margin: auto 0;
}

.welcome-logo {
  width: min(176px, 48vw);
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  border: 1px solid rgba(217, 134, 90, 0.32);
  background:
    radial-gradient(circle at 34% 26%, rgba(217, 134, 90, 0.34), transparent 28%),
    rgba(56, 39, 26, 0.62);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
  font-family: "Lora", serif;
  font-size: clamp(46px, 15vw, 68px);
  font-style: italic;
}

.welcome-logo span {
  color: var(--terra-light);
}

.full-width {
  width: 100%;
}

.auth-screen > div:first-child {
  width: 100%;
}

.text-input,
input[type="tel"],
input[type="text"],
input[type="password"] {
  width: 100%;
  min-height: 58px;
  border-radius: 18px;
  border: 1px solid var(--cream-ghost);
  background: rgba(26, 18, 8, 0.42);
  color: var(--cream);
  padding: 15px 16px;
  margin-top: 24px;
  outline: none;
}

.text-input:focus,
input:focus,
textarea:focus {
  border-color: rgba(217, 134, 90, 0.74);
  box-shadow: 0 0 0 4px rgba(196, 100, 58, 0.12);
}

.legal-copy {
  margin-top: 13px;
  text-align: center;
  font-size: 12px;
}

.otp-wrap {
  position: relative;
  margin-top: 28px;
}

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

.otp-box {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 18px;
  border: 1px solid var(--cream-ghost);
  background: rgba(247, 240, 230, 0.1);
  color: var(--cream);
  font-size: 28px;
  font-weight: 700;
}

.otp-box.filled {
  border-color: rgba(217, 134, 90, 0.82);
  background: rgba(196, 100, 58, 0.2);
}

.otp-hidden {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  margin: 0;
  padding: 0;
  border: 0;
  pointer-events: auto;
}

.centered {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.permission-icon {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(217, 134, 90, 0.42);
  background: rgba(196, 100, 58, 0.18);
  color: var(--terra-light);
  font-size: 32px;
  margin-bottom: 24px;
}

.permission-icon.muted {
  margin: auto auto 24px;
  color: var(--cream-dim);
  border-color: var(--cream-ghost);
  background: rgba(247, 240, 230, 0.08);
}

.permission-card,
.notification-preview {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  border: 1px solid var(--cream-ghost);
  background: rgba(56, 39, 26, 0.58);
  border-radius: 18px;
  padding: 16px;
}

.permission-card div {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--cream-dim);
}

.permission-card strong {
  color: var(--terra-light);
}

.notification-preview {
  text-align: left;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
}

.notification-preview span {
  color: var(--cream-dim);
  font-size: 14px;
}

.stack {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.option-card {
  width: 100%;
  min-height: 84px;
  border-radius: 18px;
  padding: 17px;
  text-align: left;
}

.option-card strong,
.answer-button strong {
  display: block;
  font-size: 16px;
  margin-bottom: 5px;
}

.option-card span {
  color: var(--cream-dim);
  font-size: 13px;
}

.option-card.selected,
.chip.active,
.answer-button.selected {
  border-color: rgba(217, 134, 90, 0.88);
  background: rgba(196, 100, 58, 0.2);
}

.progress-track {
  height: 4px;
  border-radius: 999px;
  background: var(--cream-ghost);
  overflow: hidden;
  margin: 14px 0 32px;
}

.progress-track.mini {
  margin: 0;
}

.progress-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--terra-light);
  transition: width 240ms ease;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  min-height: 40px;
  border-radius: 999px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sheet-screen {
  background: linear-gradient(180deg, var(--walnut), var(--espresso));
}

.section {
  margin-top: 24px;
}

.section h3 {
  margin: 0 0 12px;
  color: var(--terra-light);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  border-bottom: 1px solid var(--cream-ghost);
  color: var(--cream-dim);
}

.switch {
  width: 48px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid var(--cream-ghost);
  background: rgba(247, 240, 230, 0.1);
  padding: 3px;
}

.switch span {
  display: block;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--cream-dim);
  transition: transform 180ms ease, background 180ms ease;
}

.switch.active {
  background: rgba(196, 100, 58, 0.35);
  border-color: var(--terra);
}

.switch.active span {
  transform: translateX(20px);
  background: var(--terra-light);
}

.recommendation-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
  color: var(--cream-dim);
  font-size: 13px;
}

.tag {
  border: 1px solid rgba(217, 134, 90, 0.7);
  color: var(--terra-light);
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
}

.restaurant-name {
  font-size: clamp(42px, 13vw, 58px);
  line-height: 0.94;
}

.restaurant-name.small {
  margin-top: 12px;
  font-size: clamp(29px, 8vw, 40px);
}

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  color: var(--cream-dim);
  font-size: 13px;
}

.source-line {
  margin-top: 12px;
  color: var(--cream-dim);
  font-size: 12px;
}

.data-card {
  display: grid;
  gap: 5px;
  width: 100%;
  margin-top: 18px;
  border: 1px solid var(--cream-ghost);
  background: rgba(56, 39, 26, 0.56);
  border-radius: 16px;
  padding: 14px;
  color: var(--cream-dim);
  text-align: left;
}

.data-card strong {
  color: var(--cream);
}

.onboarding-progress {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 8px;
  width: min(210px, 58vw);
  margin-top: 10px;
}

.taste-counts {
  display: flex;
  justify-content: space-between;
  color: var(--cream-dim);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.onboarding-steps,
.profile-reveal {
  display: grid;
  gap: 10px;
  width: 100%;
  margin-top: 26px;
}

.step-card,
.reveal-row {
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--cream-ghost);
  background: rgba(56, 39, 26, 0.56);
  border-radius: 16px;
  padding: 13px 14px;
  color: var(--cream-dim);
  text-align: left;
}

.step-card strong {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(196, 100, 58, 0.2);
  color: var(--terra-light);
}

.reveal-row {
  justify-content: space-between;
  align-items: flex-start;
}

.reveal-row span {
  color: var(--terra-light);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.reveal-row strong {
  max-width: 64%;
  color: var(--cream);
  text-align: right;
}

.share-button {
  position: absolute;
  z-index: 3;
  right: 18px;
  top: 45%;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: 1px solid rgba(217, 134, 90, 0.55);
  background: rgba(196, 100, 58, 0.86);
  color: var(--cream);
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.38);
}

.dots {
  display: flex;
  gap: 7px;
  margin: 18px 0 0;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cream-ghost);
}

.dot.active {
  background: var(--terra-light);
}

.accepted {
  text-align: center;
  justify-content: center;
  gap: 18px;
}

.history {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.history-card {
  border: 1px solid var(--cream-ghost);
  background: rgba(56, 39, 26, 0.56);
  border-radius: 16px;
  padding: 12px;
  color: var(--cream-dim);
}

.answer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.answer-button {
  min-height: 86px;
  border-radius: 18px;
  padding: 14px;
}

.link-button {
  margin-top: 18px;
  border: 0;
  background: transparent;
  color: var(--cream-dim);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.shake {
  animation: shake 210ms ease;
}

@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-7px);
  }
  75% {
    transform: translateX(7px);
  }
}

.feedback-row {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.stars {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.rating-star {
  height: 44px;
  border-radius: 12px;
  color: var(--cream-dim);
}

.rating-star.active {
  border-color: var(--terra-light);
  background: rgba(196, 100, 58, 0.25);
  color: var(--terra-light);
}

textarea,
input[type="search"] {
  width: 100%;
  min-height: 48px;
  border-radius: 16px;
  border: 1px solid var(--cream-ghost);
  background: rgba(26, 18, 8, 0.42);
  color: var(--cream);
  padding: 13px 14px;
  outline: none;
}

textarea {
  resize: vertical;
  min-height: 96px;
  margin-top: 14px;
}

.toast {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: max(18px, env(safe-area-inset-bottom));
  z-index: 9;
  min-height: 52px;
  border-radius: 18px;
  background: rgba(26, 18, 8, 0.92);
  border: 1px solid rgba(217, 134, 90, 0.38);
  color: var(--cream);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.42);
}

@media (min-width: 520px) {
  body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 28px;
  }

  .app-shell {
    width: min(430px, 100%);
    min-height: 840px;
    max-height: 920px;
    border-radius: 38px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.62);
  }

  .screen {
    min-height: 840px;
  }
}
