:root {
  --bg-0: #14100c;
  --bg-1: #1b150f;
  --surface-a: #2a211a;
  --surface-b: #211a14;
  --ivory: #f2e8da;
  --muted: #b6a691;
  --faint: #8a7c6c;
  --copper: #e0a86a;
  --copper-2: #c98a4e;
  --line: rgba(224, 168, 106, 0.14);
  --line-soft: rgba(242, 232, 218, 0.08);
  --shadow: 0 14px 34px rgba(0, 0, 0, 0.46);
  --radius: 20px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Manrope', system-ui, sans-serif;
  color: var(--ivory);
  background:
    radial-gradient(120% 60% at 50% -10%, #241a12 0%, transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 100%);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: 28px;
  line-height: 1.5;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  text-align: center;
  padding: 38px 20px 60px;
  overflow: hidden;
}
.hero__glow {
  position: absolute;
  left: 50%; top: -40px;
  width: 360px; height: 240px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(224, 168, 106, 0.22), transparent 70%);
  filter: blur(8px);
  pointer-events: none;
}
.hero__eyebrow {
  position: relative;
  margin: 0 0 6px;
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--copper);
}
.hero__title {
  position: relative;
  margin: 0;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: clamp(40px, 13vw, 58px);
  letter-spacing: 0.01em;
  line-height: 1;
  background: linear-gradient(180deg, #fbf3e6 0%, var(--copper) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero__rule {
  position: relative;
  width: 92px; height: 1px;
  margin: 14px auto 12px;
  background: linear-gradient(90deg, transparent, var(--copper), transparent);
}
.hero__rule::before {
  content: '';
  position: absolute;
  left: 50%; top: 50%;
  width: 5px; height: 5px;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--copper);
}
.hero__tag {
  position: relative;
  margin: 0 auto;
  max-width: 460px;
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 15px;
  line-height: 1.5;
  color: var(--muted);
}

main { padding: 4px 14px 12px; max-width: 600px; margin: 0 auto; }

/* ---------- Tea card ---------- */
.tea {
  position: relative;
  background: linear-gradient(165deg, var(--surface-a), var(--surface-b));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.tea__cup {
  position: relative;
  height: 132px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 16px;
  background:
    radial-gradient(135% 100% at 50% 135%, var(--liquor) 0%, transparent 68%),
    linear-gradient(180deg, color-mix(in srgb, var(--liquor) 34%, var(--surface-a)) 0%, var(--surface-a) 100%);
}
.tea__cup::after { /* inner sheen of the brew */
  content: '';
  position: absolute;
  left: 50%; bottom: -54%;
  width: 150%; height: 110%;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, color-mix(in srgb, var(--liquor) 75%, #000), transparent 70%);
  opacity: 0.55;
  pointer-events: none;
}
.tea__cup.has-photo { height: 168px; }
.tea__photo {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
}
.tea__cup.has-photo::after { display: none; }
.tea__cup.has-photo::before { /* scrim for name legibility over photo */
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 12, 0.1) 0%, rgba(20, 16, 12, 0.72) 100%);
  z-index: 1;
}
.tea__cup.has-photo .tea__name { z-index: 2; }
.tea__cup.has-photo .tea__steam { display: none; }
.tea__steam {
  position: absolute;
  bottom: 34%;
  width: 7px; height: 46px;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255, 248, 238, 0.32), transparent);
  filter: blur(4px);
  opacity: 0;
  animation: steam 4.6s ease-in-out infinite;
}
.tea__steam:nth-child(1) { left: 42%; animation-delay: 0s; }
.tea__steam:nth-child(2) { left: 50%; animation-delay: 1.1s; height: 56px; }
.tea__steam:nth-child(3) { left: 58%; animation-delay: 2.2s; }
.tea__name {
  position: relative;
  margin: 0;
  font-family: 'Marck Script', cursive;
  font-weight: 400;
  font-size: 30px;
  line-height: 1.1;
  text-align: center;
  color: #fbf4e8;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}
.tea__body { padding: 14px 16px 16px; }
.tea__eyebrow {
  font-size: 10.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--copper);
  margin-bottom: 6px;
}
.tea__desc { margin: 0 0 12px; color: var(--muted); font-size: 14.5px; }

.notes { display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 0 0 14px; list-style: none; }
.notes li {
  font-size: 11.5px;
  color: var(--ivory);
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(224, 168, 106, 0.06);
}

.tea__foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-weight: 700; font-size: 17px; color: var(--ivory); }
.price span { font-weight: 500; font-size: 12.5px; color: var(--faint); }

/* ---------- Buttons ---------- */
button, .btn {
  font-family: inherit;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  border-radius: 12px;
  border: 0;
  padding: 11px 16px;
  color: #1a120b;
  background: linear-gradient(180deg, var(--copper), var(--copper-2));
  box-shadow: 0 6px 16px rgba(224, 168, 106, 0.18);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}
button:hover, .btn:hover { transform: translateY(-1px); filter: brightness(1.04); }
button:active, .btn:active { transform: translateY(0); }
button.secondary {
  background: transparent;
  color: var(--ivory);
  border: 1px solid var(--line);
  box-shadow: none;
}
button.block { width: 100%; margin-top: 14px; }
button:disabled { opacity: 0.45; cursor: not-allowed; filter: none; transform: none; }
.back { margin-bottom: 16px; }
.card__actions { display: flex; gap: 8px; margin-top: 12px; }
.card__actions button { flex: 1; }
.addbox { margin-top: 12px; }
.addbox[hidden] { display: none; }
.step { display: inline-flex; align-items: center; gap: 16px; }
.step__btn { width: 44px; padding: 8px 0; font-size: 20px; line-height: 1; flex: 0 0 auto; }
.step__n { min-width: 28px; text-align: center; font-size: 18px; font-weight: 700; color: var(--ivory); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 2px; }

/* ---------- Forms ---------- */
.card {
  background: linear-gradient(165deg, var(--surface-a), var(--surface-b));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px;
  margin-bottom: 14px;
}
.card h2, .card h3 { font-family: 'Cormorant Garamond', serif; font-weight: 600; margin: 0 0 10px; font-size: 24px; }
label { display: block; margin: 10px 0 5px; font-size: 13px; color: var(--muted); }
input, textarea, select {
  width: 100%;
  padding: 11px 12px;
  border-radius: 11px;
  border: 1px solid var(--line-soft);
  background: rgba(10, 7, 5, 0.5);
  color: var(--ivory);
  font-family: inherit;
  font-size: 15px;
}
input:focus, textarea:focus, select:focus { border-color: var(--copper); outline: none; }
input[type=checkbox] { width: auto; margin-right: 8px; accent-color: var(--copper); }
.consent { display: flex; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--muted); }

.detail-name { font-family: 'Marck Script', cursive; font-size: 32px; margin: 0 0 4px; color: var(--ivory); }
.brew { color: var(--muted); font-size: 14px; }
.review { border-top: 1px solid var(--line-soft); padding: 10px 0; }
.review b { color: var(--copper); }
.note { font-size: 13px; color: var(--faint); }
.qr { width: 230px; display: block; margin: 14px auto; background: #fff; padding: 10px; border-radius: 12px; }
.pay { margin: 14px 0 6px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: rgba(224, 168, 106, 0.06); }
.pay__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pay__label { font-size: 12px; color: var(--faint); }
.pay__value { font-size: 20px; font-weight: 700; color: var(--ivory); letter-spacing: 0.02em; }
.pay button.secondary { white-space: nowrap; }
.aftertaste { font-size: 12.5px; color: var(--muted); margin: 0 0 12px; }

.hero__orders {
  position: absolute;
  bottom: 12px; right: 14px;
  z-index: 2;
  width: 42px; height: 42px;
  padding: 0;
  font-size: 20px;
  background: rgba(224, 168, 106, 0.12);
  color: var(--ivory);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: none;
}
.screen-head { text-align: center; margin: 2px 0 14px; }
.screen-title {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.1;
  margin: 0;
  background: linear-gradient(180deg, #fbf3e6 0%, var(--copper) 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.screen-head .hero__rule { margin: 10px auto 0; }
body.no-hero main { padding-top: 26px; }

/* ---------- Бургер-меню ---------- */
#burger {
  position: fixed;
  top: 10px; left: 12px;
  z-index: 40;
  width: 44px; height: 44px;
  padding: 0;
  font-size: 20px; line-height: 1;
  color: var(--ivory);
  background: rgba(18, 13, 9, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
#menu {
  position: fixed;
  top: 62px; left: 12px;
  z-index: 40;
  display: flex; flex-direction: column; gap: 2px;
  min-width: 210px; padding: 8px;
  background: rgba(20, 15, 10, 0.97);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
#menu[hidden] { display: none; }
#menu button, #menu a {
  display: block; width: 100%;
  text-align: left;
  background: transparent; color: var(--ivory);
  border: 0; box-shadow: none;
  padding: 12px;
  border-radius: 10px;
  font-size: 15px; font-weight: 500;
  text-decoration: none;
}
#menu button:hover, #menu a:hover { background: rgba(224, 168, 106, 0.12); transform: none; }
#menu .is-active { background: rgba(224, 168, 106, 0.16); }
#menu .tab__badge { margin-left: 6px; }

#cart-btn {
  position: fixed;
  top: 10px; right: 12px;
  z-index: 40;
  width: 44px; height: 44px;
  padding: 0;
  font-size: 20px; line-height: 1;
  color: var(--ivory);
  background: rgba(18, 13, 9, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow);
}
#cart-btn .cart-badge {
  position: absolute;
  top: -6px; right: -6px;
  min-width: 18px; height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--copper); color: #1a120b;
  font-size: 11px; font-weight: 700; line-height: 18px;
  box-shadow: none;
}
.cart-badge[hidden] { display: none; }

/* ---------- Адаптивность ---------- */
#tabbar { gap: 3px; }
.tab { font-size: 13px; padding: 9px 4px; }
@media (max-width: 380px) {
  #tabbar { gap: 2px; padding-left: 6px; padding-right: 6px; }
  .tab { font-size: 11px; padding: 8px 1px; }
  .tab__badge { min-width: 15px; padding: 1px 4px; font-size: 10px; }
}
@media (min-width: 700px) {
  #tabbar { max-width: 600px; margin: 0 auto; border-radius: 16px 16px 0 0; }
  .hero { padding-top: 48px; }
}
.empty { text-align: center; color: var(--muted); padding: 40px 0; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 20px; }

/* ---------- Tab bar ---------- */
#tabbar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 6px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(18, 13, 9, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line-soft);
}
.tab {
  flex: 1;
  background: transparent;
  color: var(--muted);
  box-shadow: none;
  border-radius: 10px;
  padding: 9px 8px;
  text-align: center;
  text-decoration: none;
  font-size: 13.5px;
}
.tab.is-active { color: var(--ivory); background: rgba(224, 168, 106, 0.12); }
.tab__badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 2px;
  border-radius: 999px;
  background: var(--copper);
  color: #1a120b;
  font-size: 11px;
  font-weight: 700;
}

@keyframes rise { to { opacity: 1; transform: translateY(0); } }
@keyframes steam {
  0% { opacity: 0; transform: translateY(0) scaleX(1); }
  30% { opacity: 0.7; }
  100% { opacity: 0; transform: translateY(-34px) scaleX(1.5); }
}

@media (prefers-reduced-motion: reduce) {
  .tea { opacity: 1; transform: none; animation: none; }
  .tea__steam { display: none; }
  button:hover, .btn:hover { transform: none; }
}
