:root {
  --bg: #120c08;
  --wood: #3a2416;
  --gold: #e8c27a;
  --cream: #f4e6c8;
  --ink: #2b1c12;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  background: #070504;
  color: var(--cream);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  user-select: none;
  overflow: hidden;
}

input, textarea {
  user-select: text;
}

.stage {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse at 50% 20%, #3a2718 0%, #070504 62%);
}

.phone {
  position: relative;
  width: min(390px, 100%);
  height: min(844px, calc(100dvh - 32px));
  border-radius: 44px;
  overflow: hidden;
  background: #1a120b;
  box-shadow:
    0 0 0 10px #1c1410,
    0 0 0 12px #5a4634,
    0 40px 80px rgba(0, 0, 0, 0.55);
}

.status-bar {
  position: absolute;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: calc(52px + var(--safe-top));
  padding: calc(14px + var(--safe-top)) 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 650;
  color: #fff8ea;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.notch {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 118px;
  height: 28px;
  transform: translateX(-50%);
  background: #0b0705;
  border-radius: 20px;
}

.stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.signal, .wifi, .battery {
  display: inline-block;
  background: #fff8ea;
}

.signal {
  width: 15px;
  height: 10px;
  clip-path: polygon(0 100%, 25% 70%, 25% 100%, 50% 40%, 50% 100%, 75% 15%, 75% 100%, 100% 0, 100% 100%, 0 100%);
}

.wifi {
  width: 14px;
  height: 10px;
  border: 2px solid #fff8ea;
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: transparent;
}

.battery {
  width: 22px;
  height: 11px;
  border-radius: 3px;
  position: relative;
}

.battery::after {
  content: "";
  position: absolute;
  right: -3px;
  top: 3px;
  width: 2px;
  height: 5px;
  background: #fff8ea;
  border-radius: 0 1px 1px 0;
}

.splash, .home, .screen {
  position: absolute;
  inset: 0;
}

.splash {
  z-index: 6;
  background: #070504;
}

.phone.is-splash .status-bar {
  visibility: hidden;
}

.splash-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #070504;
}

.vignette {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(18, 10, 6, 0.35) 0%, transparent 22%, transparent 58%, rgba(12, 7, 4, 0.78) 100%);
}

.sparkles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    radial-gradient(circle, rgba(255, 236, 186, 0.9) 0 1px, transparent 2px),
    radial-gradient(circle, rgba(255, 220, 140, 0.7) 0 1px, transparent 2px);
  background-size: 160px 160px, 220px 220px;
  background-position: 20% 18%, 70% 30%;
  animation: twinkle 3.2s ease-in-out infinite;
}

.splash-copy {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 118px;
  text-align: center;
  text-shadow: 0 8px 24px rgba(0, 0, 0, 0.55);
}

.eyebrow {
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 11px;
  color: var(--gold);
  margin-bottom: 8px;
}

.splash-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(40px, 9vw, 56px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 0.95;
}

.coming {
  margin-top: 10px;
  font-size: 22px;
  font-style: italic;
  color: #f7ead0;
}

.version {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
}

.loader {
  position: absolute;
  left: 40px;
  right: 40px;
  bottom: calc(36px + var(--safe-bottom));
  text-align: center;
}

.loader p {
  margin-top: 10px;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: #ead9b8;
}

.bar {
  height: 4px;
  border-radius: 99px;
  background: rgba(255, 248, 230, 0.18);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #c99a4a, #f3e0a8);
  animation: load 2.4s ease-in-out forwards;
}

.home, .screen {
  display: flex;
  flex-direction: column;
  padding: 84px 22px 40px;
  background: linear-gradient(180deg, #24160f, #120c08);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  overflow-y: auto;
}

.home.show, .screen.show {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.hidden {
  display: none !important;
}

.home-head .kicker {
  color: var(--gold);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 11px;
}

.home-head h2 {
  font-size: 28px;
  margin-top: 6px;
}

.card {
  margin-top: 22px;
  border-radius: 28px;
  overflow: hidden;
  background: #2a1b12;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 18px 18px 22px;
}

.card-body h3 {
  font-size: 16px;
  margin-bottom: 8px;
}

.card-body p {
  font-size: 14px;
  line-height: 1.45;
  color: #e8d7bb;
}

.cta {
  margin-top: 16px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 14px 16px;
  font-size: 16px;
  font-weight: 650;
  color: #1a120b;
  background: linear-gradient(180deg, #f3e0a8, #c99a4a);
}

.cta:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.home-indicator {
  position: absolute;
  z-index: 30;
  left: 50%;
  bottom: 10px;
  width: 128px;
  height: 5px;
  transform: translateX(-50%);
  border-radius: 99px;
  background: rgba(255, 248, 230, 0.55);
}

@keyframes kenburns {
  to { transform: scale(1); }
}

@keyframes twinkle {
  50% { opacity: 0.45; }
}

@keyframes load {
  to { width: 100%; }
}

.auth-screen {
  padding: 0 0 36px;
  background: #140e0a;
}

.auth-header {
  margin: 0;
  width: 100%;
  height: 250px;
  overflow: hidden;
  flex-shrink: 0;
}

.auth-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  display: block;
  image-rendering: auto;
}

.auth-body {
  padding: 16px 18px 8px;
  text-align: center;
}

.cafe-logos {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: -28px 0 14px;
  position: relative;
  z-index: 2;
}

.cafe-logo {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #1a120b;
  background: linear-gradient(180deg, #f3e0a8, #c99a4a);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.35);
}

.cafe-logo svg {
  width: 28px;
  height: 28px;
}

.auth-stamp {
  display: inline-block;
  margin: 0 auto 10px;
  padding: 5px 12px;
  border-radius: 999px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 10px;
  font-weight: 700;
  color: #1a120b;
  background: linear-gradient(180deg, #f3e0a8, #c99a4a);
}

.auth-body h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  line-height: 1.15;
  margin: 0 auto 8px;
}

.auth-tagline {
  margin: 0 auto 16px;
  max-width: 280px;
  font-size: 13px;
  line-height: 1.4;
  color: #f4e6c8;
}

.notice {
  border-radius: 16px;
  padding: 12px 14px;
  margin: 0 auto 10px;
  max-width: 340px;
  text-align: center;
}

.notice strong {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--gold);
}

.notice p {
  font-size: 12px;
  line-height: 1.5;
  color: #ead9b8;
}

.notice-promo {
  background: rgba(232, 194, 122, 0.12);
  border: 1px solid rgba(232, 194, 122, 0.28);
}

.notice-mesa {
  background: rgba(255, 248, 230, 0.06);
  border: 1px solid rgba(255, 248, 230, 0.12);
}

.cafe-form {
  margin: 12px auto 0;
  max-width: 340px;
  padding: 14px 14px 8px;
  border-radius: 20px;
  background: rgba(26, 18, 11, 0.72);
  text-align: left;
}

.form-kicker {
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  text-align: center;
}

.auth-brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 18px;
}

.auth-brand img {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 18px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 4px;
  border-radius: 16px;
  background: rgba(255, 248, 230, 0.08);
  margin-bottom: 16px;
}

.tab {
  border: 0;
  background: transparent;
  color: #ead9b8;
  border-radius: 12px;
  padding: 10px 8px;
  font-weight: 650;
}

.tab.is-active {
  background: linear-gradient(180deg, #f3e0a8, #c99a4a);
  color: #1a120b;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #ead9b8;
}

.auth-form input,
.auth-form select {
  border: 0;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 16px;
  color: #fff8ea;
  background: #2a1b12;
  outline: none;
}

.auth-form select {
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
  background-color: #2a1b12;
  background-image: linear-gradient(45deg, transparent 50%, #e8c27a 50%), linear-gradient(135deg, #e8c27a 50%, transparent 50%);
  background-position: calc(100% - 18px) 18px, calc(100% - 12px) 18px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

.auth-form input:focus,
.auth-form select:focus {
  box-shadow: 0 0 0 2px var(--gold);
}

.form-error {
  color: #ffb4a2;
  font-size: 13px;
  min-height: 18px;
}

.lead {
  margin: 4px 0 16px;
  color: #e8d7bb;
  font-size: 14px;
}

.screen-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.ghost {
  border: 0;
  background: rgba(255, 248, 230, 0.1);
  color: var(--cream);
  border-radius: 999px;
  padding: 8px 14px;
  font-weight: 650;
}

.product-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 24px;
}

.product-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 20px;
  background: #2a1b12;
}

.product-card .emoji {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: rgba(243, 224, 168, 0.12);
  font-size: 22px;
}

.product-card h3 {
  font-size: 15px;
}

.product-card p {
  font-size: 12px;
  color: #e8d7bb;
  margin: 3px 0;
}

.product-card small {
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 10px;
}

.product-card strong {
  color: var(--gold);
  font-size: 14px;
}

@media (display-mode: standalone), (max-width: 480px) {
  .stage {
    padding: 0;
    background: #120c08;
  }

  .phone {
    width: 100%;
    height: 100dvh;
    border-radius: 0;
    box-shadow: none;
  }

  .notch {
    display: none;
  }
}
