:root {
  --bg: #f6f1ea;
  --paper: #fbf7f1;
  --ink: #2a221b;
  --muted: #7a6c5e;
  --line: #e6dcd0;
  --wood: #3d2b1f;
  --radius: 16px;
  --serif: "Cormorant Garamond", "Iowan Old Style", Palatino, Georgia, serif;
  --sans: "Source Sans 3", "Avenir Next", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  overscroll-behavior: none;
}

#app {
  height: 100dvh;
  overflow: hidden;
}

.boot {
  margin: 0;
  padding: 4rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.shell {
  width: min(390px, 100%);
  height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.top {
  flex: 0 0 auto;
  padding: 0.55rem 1.1rem 0.4rem;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 32px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
}

.logo {
  display: block;
  height: 24px;
  width: auto;
  max-width: 24px;
  object-fit: contain;
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.12rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1;
}

.back {
  appearance: none;
  border: 0;
  background: none;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  padding: 0.3rem 0;
  min-height: 40px;
  cursor: pointer;
}

.progress {
  margin-top: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
}

.progress-bar {
  flex: 1;
  height: 2px;
  background: var(--line);
  overflow: hidden;
}

.progress-bar span {
  display: block;
  height: 100%;
  background: var(--wood);
}

.main {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.35rem 1.1rem 0.4rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

h1 {
  font-family: var(--serif);
  font-size: 1.7rem;
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.7rem;
}

.grid {
  display: grid;
  gap: 0.5rem;
}

.grid.two {
  grid-template-columns: 1fr 1fr;
}

.pills {
  display: flex;
  gap: 0.4rem;
}

.card,
.pill {
  appearance: none;
  font: inherit;
  color: inherit;
  text-align: left;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
}

.card {
  padding: 0.7rem 0.8rem;
  width: 100%;
  min-height: 48px;
}

.pill {
  flex: 1;
  padding: 0.65rem 0;
  min-height: 44px;
  border-radius: 999px;
  text-align: center;
  font-size: 1rem;
}

.card:hover,
.pill:hover,
.card:focus-visible,
.pill:focus-visible {
  border-color: var(--wood);
  outline: none;
}

.card.is-on,
.pill.is-on {
  border-color: var(--wood);
}

.card .name {
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0;
  font-weight: 500;
  letter-spacing: -0.01em;
}

.meta,
.note {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.price {
  margin: 0.12rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.section-label {
  margin: 0.75rem 0 0.4rem;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.coming-panel {
  margin-top: 0.6rem;
}

.coming-panel p {
  margin: 0;
  color: var(--muted);
}

.product-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.45rem 0.6rem;
  min-height: 64px;
}

.thumb {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex: 0 0 52px;
  background: #ede4d6;
}

.thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 0.58rem;
  letter-spacing: 0.04em;
  text-align: center;
  padding: 0.2rem;
}

.product-copy {
  min-width: 0;
}

.product-copy .name {
  font-size: 1.05rem;
}

.footer {
  flex: 0 0 auto;
  padding: 0.45rem 1.1rem calc(0.55rem + env(safe-area-inset-bottom));
  background: var(--bg);
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  text-decoration: none;
  font: inherit;
  font-weight: 500;
  border-radius: 14px;
  padding: 0.75rem 1rem;
  min-height: 48px;
  cursor: pointer;
  border: 0;
}

.btn[disabled] {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--wood);
  color: var(--bg);
}

.btn-text {
  background: transparent;
  color: var(--ink);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  min-height: 40px;
  padding: 0.3rem;
}

.exits {
  display: grid;
  gap: 0.15rem;
}

.exit-row {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
}

.exit-row .btn-text {
  width: auto;
  flex: 1;
}

.review-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.review-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.15rem 0.6rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}

.review-list .sku {
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.review-list .item-name {
  font-size: 0.95rem;
}

.line-total {
  text-align: right;
  color: var(--muted);
  font-size: 0.95rem;
}

.orient {
  margin: 0.7rem 0 0;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-family: var(--serif);
  font-size: 1.28rem;
  font-weight: 500;
  letter-spacing: -0.02em;
}

.error {
  padding: 2.5rem 1.35rem;
}

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

.stage-fg {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
  opacity: 0;
  transform: translate3d(0, 10px, 0);
  transition: opacity 450ms ease, transform 450ms ease;
}

.stage-fg.is-in {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.stage-fg.is-leaving {
  opacity: 0;
  transform: translate3d(0, -8px, 0);
  transition: opacity 400ms ease, transform 400ms ease;
}

.intro,
.interstitial {
  position: fixed;
  inset: 0;
  z-index: 30;
  cursor: pointer;
  overflow: hidden;
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem 1.75rem 5.5rem;
  background: #f6f1ea;
}

.intro-field {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.intro-field img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% 18%;
  opacity: 0.22;
  transform: scale(1.12) translate3d(0, 8px, 0);
  transition: transform 700ms ease, opacity 700ms ease;
}

.intro.is-in .intro-field img {
  transform: scale(1.12) translate3d(0, 0, 0);
  animation: field-drift 14s ease-in-out 0.7s infinite alternate;
}

.intro-mark {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  transition: transform 480ms ease, opacity 480ms ease;
}

.intro.is-in .intro-mark {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  animation: mark-float 7s ease-in-out 0.5s infinite alternate;
}

.intro-logo {
  display: block;
  width: min(42vw, 168px);
  height: auto;
}

.intro-wordmark {
  margin-top: 0.85rem;
  font-family: var(--serif);
  font-size: clamp(1.85rem, 7vw, 2.35rem);
  font-weight: 500;
  letter-spacing: 0.02em;
  line-height: 1;
}

.intro-line {
  margin: 1.15rem 0 0;
  max-width: 16em;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.45;
}

.intro-begin {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(1.6rem + env(safe-area-inset-bottom));
  z-index: 1;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0;
  transition: opacity 600ms ease;
}

.intro.is-in .intro-begin {
  opacity: 1;
}

.intro.is-leaving .intro-field img {
  animation: none;
  transform: scale(1.12) translate3d(0, 8px, 0);
  opacity: 0;
  transition: transform 700ms ease, opacity 700ms ease;
}

.intro.is-leaving .intro-mark {
  animation: none;
  transform: translate3d(0, -14px, 0);
  opacity: 0;
  transition: transform 450ms ease, opacity 450ms ease;
}

.intro.is-leaving .intro-begin {
  opacity: 0;
  transition: opacity 400ms ease;
}

.interstitial {
  background: #1c1612;
}

.interstitial-photo {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.interstitial-photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.1) translate3d(0, 12px, 0);
  opacity: 0.86;
  transition: transform 700ms ease, opacity 700ms ease;
}

.interstitial.is-in .interstitial-photo img {
  transform: scale(1.1) translate3d(0, 0, 0);
  opacity: 1;
}

.interstitial.is-leaving .interstitial-photo img {
  transform: scale(1.1) translate3d(0, -8px, 0);
  opacity: 0;
  transition: transform 700ms ease, opacity 700ms ease;
}

.interstitial-line {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  margin: 0;
  padding: 0.9rem 1.25rem calc(1.1rem + env(safe-area-inset-bottom));
  background: #f6f1ea;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.2rem;
  text-align: center;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  transition: transform 480ms ease, opacity 480ms ease;
}

.interstitial.is-in .interstitial-line {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.interstitial.is-leaving .interstitial-line {
  opacity: 0;
  transform: translate3d(0, -16px, 0);
  transition: transform 400ms ease, opacity 400ms ease;
}

@keyframes field-drift {
  from {
    transform: scale(1.12) translate3d(0, 0, 0);
  }
  to {
    transform: scale(1.12) translate3d(0, 12px, 0);
  }
}

@keyframes mark-float {
  from {
    transform: translate3d(0, 6px, 0);
  }
  to {
    transform: translate3d(0, -8px, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .intro-field img,
  .intro-mark,
  .intro-begin,
  .interstitial-photo img,
  .interstitial-line,
  .stage-fg {
    animation: none !important;
    transform: none !important;
    transition: opacity 450ms ease;
  }

  .interstitial-photo img {
    opacity: 1;
  }

  .intro-field img {
    opacity: 0.22;
  }
}
