@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/Montserrat-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --font-serif: Georgia, "Times New Roman", serif;
  --font-sans: "Montserrat", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --bg: #f5f0e8;
  --bg-soft: #faf7f2;
  --surface: #ffffff;
  --surface-strong: #fffdf9;
  --text: #171b18;
  --text-soft: #37403a;
  --muted: #6e756f;
  --muted-light: #929892;
  --accent: #123f32;
  --accent-strong: #0a3026;
  --accent-soft: #e8f0ec;
  --accent-pale: #f1f6f3;
  --gold: #b99458;
  --gold-soft: #f4ead9;
  --line: #e5ddd2;
  --line-soft: #eee8df;
  --danger: #b24e45;
  --warning: #a36f22;
  --shadow-soft: 0 8px 28px rgba(31, 35, 31, 0.065);
  --shadow-card: 0 14px 36px rgba(31, 35, 31, 0.09);
  --shadow-elevated: 0 24px 70px rgba(22, 27, 23, 0.18);
  --radius-sm: 12px;
  --radius-md: 15px;
  --radius-lg: 19px;
  --radius-xl: 24px;
  --radius-pill: 999px;
  --space: 16px;
  --header-h: calc(58px + env(safe-area-inset-top));
  font-family: var(--font-sans);
}

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

html {
  min-width: 0;
  min-height: 100%;
  overflow-x: hidden;
  background: #e9e3da;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 0;
  min-height: 100dvh;
  overflow-x: hidden;
  background: #e9e3da;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.45;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body,
button,
input {
  font-family: var(--font-sans);
}

button,
input {
  font: inherit;
}

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

button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(18, 63, 50, 0.42);
  outline-offset: 2px;
}

img {
  display: block;
  max-width: 100%;
}

svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  stroke-width: 1.9;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  overflow-wrap: anywhere;
}

.app-shell {
  position: relative;
  width: min(100%, 430px);
  min-height: 100dvh;
  margin: 0 auto;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  box-shadow: 0 24px 80px rgba(22, 27, 23, 0.14);
}

.app-content {
  min-height: 100dvh;
  padding: calc(var(--header-h) + 10px) var(--space) calc(164px + env(safe-area-inset-bottom));
  transition: filter 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.app-shell.cart-open .app-content {
  filter: blur(5px);
  opacity: 0.48;
  transform: scale(0.994);
  pointer-events: none;
}

.telegram-header {
  position: fixed;
  top: 0;
  left: 50%;
  z-index: 70;
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr) 84px;
  align-items: center;
  gap: 8px;
  width: min(100%, 430px);
  min-height: var(--header-h);
  padding: calc(8px + env(safe-area-inset-top)) var(--space) 8px;
  border-bottom: 1px solid rgba(229, 221, 210, 0.86);
  background: rgba(245, 240, 232, 0.9);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.header-quick-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.header-lang {
  font-size: 9px;
  font-weight: 700;
}

.header-icon,
.profile-chip,
.sheet-close {
  display: grid;
  place-items: center;
  width: 38px;
  min-width: 38px;
  height: 38px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent);
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, box-shadow 180ms ease, background 180ms ease;
}

.header-icon:hover,
.profile-chip:hover,
.sheet-close:hover {
  background: var(--surface);
  box-shadow: var(--shadow-card);
}

.header-icon:active,
.profile-chip:active,
.sheet-close:active {
  transform: scale(0.97);
}

.telegram-title {
  min-width: 0;
  text-align: center;
}

.telegram-title strong,
.telegram-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.telegram-title strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.15;
}

.telegram-title span {
  margin-top: 2px;
  color: var(--muted-light);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-hero {
  display: grid;
  gap: 16px;
  margin: 0 calc(var(--space) * -1) 28px;
  padding: 12px var(--space) 0;
}

.app-hero.is-hidden {
  display: none;
}

.hero-copy {
  display: grid;
  gap: 11px;
}

.hero-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.lang-switch {
  display: grid;
  grid-template-columns: repeat(2, 34px);
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.lang-switch button {
  min-height: 36px;
  padding: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  transition: background 180ms ease, color 180ms ease;
}

.lang-switch button.is-active {
  background: var(--accent);
  color: #fff;
}

.profile-chip {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.hero-copy h1 {
  max-width: 360px;
  margin: 0;
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: clamp(34px, 9.4vw, 42px);
  font-weight: 700;
  line-height: 0.98;
  letter-spacing: 0;
}

.hero-copy > p {
  max-width: 360px;
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.55;
}

.hero-buttons {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 8px;
}

.primary-button,
.secondary-button,
.text-button,
.inline-button,
.add-button,
.pay-option,
.fulfillment-switch button {
  transition: transform 160ms ease, box-shadow 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.primary-button,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 46px;
  padding: 0 15px;
  border-radius: var(--radius-md);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
}

.primary-button {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(18, 63, 50, 0.2);
}

.secondary-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-soft);
  box-shadow: var(--shadow-soft);
}

.primary-button:hover,
.secondary-button:hover {
  box-shadow: var(--shadow-card);
}

.primary-button:active,
.secondary-button:active,
.text-button:active,
.inline-button:active,
.add-button:active,
.pay-option:active,
.fulfillment-switch button:active {
  transform: scale(0.985);
}

.hero-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 9.8;
  border-radius: var(--radius-xl);
  background: var(--accent-soft);
  box-shadow: var(--shadow-card);
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(7, 30, 23, 0.3));
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 68%;
}

.hero-badge {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  max-width: calc(100% - 24px);
  padding: 0 11px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent-strong);
  box-shadow: 0 10px 24px rgba(12, 22, 17, 0.13);
  font-size: 10px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tab-panel {
  display: none;
  min-width: 0;
}

.tab-panel.is-active {
  display: block;
  animation: panel-in 220ms ease both;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  margin: 0 0 14px;
}

.section-head > div {
  min-width: 0;
}

.section-head h2 {
  margin: 5px 0 0;
  color: var(--text);
  font-size: 22px;
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: 0;
}

.section-head.compact {
  margin-top: 26px;
}

.section-note {
  margin: -5px 0 14px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.text-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.search-bar {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  margin-bottom: 12px;
  padding: 0 13px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.search-bar:focus-within {
  border-color: rgba(18, 63, 50, 0.42);
  box-shadow: 0 0 0 3px rgba(18, 63, 50, 0.08), var(--shadow-soft);
}

.search-bar svg {
  color: var(--muted);
}

.search-bar input {
  width: 100%;
  min-width: 0;
  height: 44px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
}

.search-bar input::placeholder {
  color: var(--muted-light);
}

.search-bar input:focus-visible {
  outline: 0;
}

.search-bar span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.category-row {
  display: flex;
  gap: 8px;
  margin: 0 calc(var(--space) * -1) 15px;
  padding: 0 var(--space) 3px;
  overflow-x: auto;
  scroll-behavior: smooth;
  scrollbar-width: none;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 34px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 34px), transparent 100%);
}

.category-row::-webkit-scrollbar,
.promo-list::-webkit-scrollbar {
  display: none;
}

.category-row.is-dragging {
  cursor: grabbing;
  scroll-behavior: auto;
}

.category-button {
  flex: 0 0 auto;
  min-width: max-content;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-pill);
  background: var(--surface);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  transition: transform 160ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.category-button.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 20px rgba(18, 63, 50, 0.16);
}

.category-button:active {
  transform: scale(0.98);
}

.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.menu-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 22px 18px;
  border: 1px dashed #d8d0c5;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  text-align: center;
}

.text-button:disabled {
  cursor: default;
  opacity: 0.42;
}

.menu-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.menu-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-card);
}

.menu-card.has-item {
  border-color: rgba(18, 63, 50, 0.42);
}

.menu-media {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: var(--accent-soft);
}

.menu-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 260ms ease;
}

.menu-card:hover .menu-media img {
  transform: scale(1.025);
}

.menu-media.image-fallback {
  background: var(--accent-soft);
}

.menu-media.image-fallback::before {
  content: "Biznesbot Coffee";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--accent);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 700;
  text-align: center;
}

.badge-row {
  position: absolute;
  top: 8px;
  left: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: calc(100% - 16px);
}

.badge-row span,
.status-pill,
.promo-top span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 0 8px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.9);
  color: var(--accent);
  box-shadow: 0 5px 14px rgba(22, 27, 23, 0.1);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.menu-info {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 144px;
  padding: 12px;
}

.menu-info > div:first-child {
  min-width: 0;
}

.menu-info h3 {
  display: -webkit-box;
  margin: 0 0 5px;
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.menu-info p,
.muted,
.hint,
.status {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.45;
}

.menu-info p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.price-row,
.branch-meta,
.branch-foot,
.promo-top,
.cart-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.menu-card .price-row {
  flex-wrap: wrap;
}

.price {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
}

.qty {
  display: grid;
  grid-template-columns: 28px 24px 28px;
  align-items: center;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  flex: 0 0 80px;
}

.qty-button,
.mini-qty button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
}

.qty-button {
  width: 28px;
  height: 30px;
}

.qty strong {
  text-align: center;
  color: var(--text);
  font-size: 11px;
}

.add-button {
  min-width: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  line-height: 1;
}

.promo-list {
  display: flex;
  gap: 12px;
  margin: 0 calc(var(--space) * -1);
  padding: 0 var(--space) 8px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0, #000 14px, #000 calc(100% - 24px), transparent 100%);
}

.promo-card {
  position: relative;
  flex: 0 0 min(82vw, 330px);
  min-width: 0;
  overflow: hidden;
  scroll-snap-align: center;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.promo-card.is-active {
  border-color: rgba(18, 63, 50, 0.46);
}

.promo-media {
  position: relative;
  aspect-ratio: 16 / 8.6;
  overflow: hidden;
  background: var(--accent-soft);
}

.promo-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.promo-top {
  position: absolute;
  top: 10px;
  right: 10px;
  left: 10px;
}

.promo-top strong {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgba(18, 63, 50, 0.92);
  color: #fff;
  box-shadow: 0 6px 18px rgba(12, 30, 22, 0.18);
  font-size: 10px;
  font-weight: 700;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.promo-body {
  display: grid;
  gap: 8px;
  padding: 15px;
}

.promo-body h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 1.2;
}

.promo-body p {
  min-height: 36px;
  margin: 0;
  font-size: 11px;
}

.inline-button {
  justify-self: start;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.branch-list,
.history-list,
.settings-list,
.offer-list {
  display: grid;
  gap: 10px;
}

.branch-card {
  display: grid;
  gap: 10px;
  width: 100%;
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  text-align: left;
  box-shadow: var(--shadow-soft);
  transition: transform 160ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.branch-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.branch-card.is-active {
  border-color: rgba(18, 63, 50, 0.5);
  background: var(--accent-pale);
}

.branch-meta {
  align-items: flex-start;
}

.branch-meta h3 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.branch-card > p {
  margin: 0;
  font-size: 11px;
}

.status-pill {
  flex: 0 0 auto;
  min-height: 23px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: none;
  font-size: 8px;
}

.status-pill.open {
  border-color: rgba(46, 125, 91, 0.24);
  background: #edf7f1;
  color: #286b4e;
}

.status-pill.soon {
  border-color: rgba(163, 111, 34, 0.24);
  background: #fff7e6;
  color: var(--warning);
}

.status-pill.closed {
  border-color: rgba(178, 78, 69, 0.22);
  background: #fff0ee;
  color: var(--danger);
}

.branch-foot {
  padding-top: 9px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9.5px;
}

.branch-foot strong {
  color: var(--accent);
  font-weight: 700;
}

.profile-card,
.profile-block,
.profile-stats article,
.profile-meta,
.settings-list,
.history-card {
  border: 1px solid var(--line-soft);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.profile-card {
  position: relative;
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 16px;
  border-radius: var(--radius-xl);
}

.avatar {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 700;
}

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

.profile-copy h2 {
  margin: 4px 0 3px;
  overflow: hidden;
  color: var(--text);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy p:last-child {
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.loyalty-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: var(--radius-pill);
  background: var(--gold-soft);
  color: #765b31;
  font-size: 8px;
  font-weight: 700;
  line-height: 24px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.profile-stats article {
  min-width: 0;
  min-height: 82px;
  padding: 12px;
  border-radius: var(--radius-lg);
}

.profile-stats article:last-child {
  grid-column: 1 / -1;
}

.profile-stats span,
.profile-meta span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.35;
}

.profile-stats strong,
.profile-meta strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.progress {
  height: 7px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
}

.progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

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

.profile-block {
  min-width: 0;
  padding: 14px;
  border-radius: var(--radius-lg);
}

.block-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.block-heading h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
}

.block-heading svg {
  color: var(--accent);
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.pill-list span,
.offer-list article {
  min-width: 0;
  border-radius: var(--radius-sm);
  background: var(--accent-pale);
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.35;
}

.pill-list span {
  padding: 7px 9px;
}

.offer-list article {
  padding: 9px 10px;
}

.profile-meta,
.settings-list {
  display: grid;
  gap: 0;
  margin-top: 10px;
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.profile-meta div,
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  min-height: 54px;
  padding: 10px 13px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  background: transparent;
  text-align: left;
}

.profile-meta div:last-child,
.setting-row:last-child {
  border-bottom: 0;
}

.profile-meta div > * {
  min-width: 0;
}

.profile-meta strong {
  max-width: 64%;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.setting-row span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 600;
}

.setting-row i {
  position: relative;
  flex: 0 0 auto;
  width: 36px;
  height: 21px;
  border-radius: var(--radius-pill);
  background: #d8ddd9;
  transition: background 180ms ease;
}

.setting-row i::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(20, 24, 20, 0.2);
  transition: transform 180ms ease;
}

.setting-row.is-active i {
  background: var(--accent);
}

.setting-row.is-active i::after {
  transform: translateX(15px);
}

.history-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius-lg);
}

.history-card h3 {
  margin: 0;
  color: var(--text);
  font-size: 12px;
}

.history-card > p {
  margin: 0;
}

.history-card .inline-button {
  justify-self: stretch;
  background: var(--surface);
  color: var(--accent);
}

.tabs {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 50%;
  z-index: 60;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: min(100%, 430px);
  min-height: calc(68px + env(safe-area-inset-bottom));
  padding: 7px 10px calc(7px + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(229, 221, 210, 0.9);
  background: rgba(255, 253, 249, 0.94);
  box-shadow: 0 -12px 34px rgba(27, 31, 27, 0.08);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.tab {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 4px;
  min-width: 0;
  padding: 0 3px;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1;
  transition: background 180ms ease, color 180ms ease, transform 160ms ease;
}

.tab svg {
  width: 19px;
  height: 19px;
}

.tab span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tab.is-active {
  background: var(--accent-pale);
  color: var(--accent);
}

.tab:active {
  transform: scale(0.97);
}

.checkout {
  position: fixed;
  inset: 0;
  z-index: 80;
  pointer-events: none;
}

.checkout-summary {
  position: fixed;
  bottom: calc(78px + env(safe-area-inset-bottom));
  left: 50%;
  z-index: 83;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  width: min(calc(100% - 28px), 402px);
  min-height: 54px;
  padding: 0 14px 0 10px;
  border: 1px solid rgba(18, 63, 50, 0.28);
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 16px 38px rgba(10, 48, 38, 0.26);
  transform: translateX(-50%);
  pointer-events: auto;
  transition: transform 180ms ease, opacity 180ms ease, box-shadow 180ms ease;
}

.checkout-summary:hover {
  box-shadow: 0 18px 44px rgba(10, 48, 38, 0.31);
}

.checkout-summary:active {
  transform: translateX(-50%) scale(0.99);
}

.checkout-summary.is-pulsing {
  animation: cart-pulse 300ms ease;
}

.cart-icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.12);
}

.cart-icon b {
  position: absolute;
  top: -4px;
  right: -4px;
  display: grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border: 2px solid var(--accent);
  border-radius: var(--radius-pill);
  background: #fff;
  color: var(--accent);
  font-size: 8px;
  font-weight: 700;
}

.cart-label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 700;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-summary > strong {
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.cart-arrow {
  width: 9px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: translateY(-2px) rotate(45deg);
}

.checkout-backdrop,
.modal-backdrop {
  position: fixed;
  inset: 0;
  border: 0;
  background: rgba(19, 24, 20, 0.32);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.checkout-panel {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 84;
  width: min(100%, 430px);
  max-height: min(84dvh, 720px);
  padding: 8px var(--space) calc(18px + env(safe-area-inset-bottom));
  overflow-y: auto;
  overscroll-behavior: contain;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--surface-strong);
  box-shadow: var(--shadow-elevated);
  transform: translate(-50%, 102%);
  pointer-events: none;
  transition: transform 260ms cubic-bezier(0.22, 0.78, 0.28, 1);
}

.checkout.is-open .checkout-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.checkout.is-open .checkout-panel {
  transform: translate(-50%, 0);
  pointer-events: auto;
}

.checkout.is-open .checkout-summary {
  opacity: 0;
  pointer-events: none;
}

.sheet-handle {
  width: 42px;
  height: 4px;
  margin: 2px auto 12px;
  border-radius: var(--radius-pill);
  background: #d7d0c7;
}

.checkout-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 13px;
}

.checkout-title h2 {
  margin: 4px 0 2px;
  color: var(--text);
  font-size: 21px;
  line-height: 1.15;
}

.checkout-title p:last-child {
  margin: 0;
}

.cart-items {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.cart-row {
  align-items: center;
  padding: 10px 11px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cart-row > div:first-child {
  min-width: 0;
}

.cart-row strong {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cart-row p {
  margin: 4px 0 0;
  font-size: 9px;
}

.cart-actions {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.mini-qty {
  display: grid;
  grid-template-columns: repeat(2, 28px);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-pill);
}

.mini-qty button {
  width: 28px;
  height: 25px;
}

.cart-empty {
  margin: 0;
  padding: 18px;
  border: 1px dashed #d8d0c5;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  text-align: center;
}

.fulfillment-switch,
.pay-options {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--bg-soft);
}

.fulfillment-switch {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 10px;
}

.fulfillment-switch button,
.pay-option {
  min-width: 0;
  min-height: 40px;
  padding: 0 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.fulfillment-switch button.is-active,
.pay-option.is-active {
  background: var(--accent);
  color: #fff;
}

.checkout-branch {
  position: relative;
  display: grid;
  gap: 4px;
  min-width: 0;
  margin-bottom: 10px;
  padding: 11px 86px 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.checkout-branch span,
.field > span,
.pay-box > span {
  color: var(--muted);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.2;
}

.checkout-branch strong {
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.checkout-branch button {
  position: absolute;
  top: 50%;
  right: 10px;
  padding: 5px 7px;
  border-radius: var(--radius-sm);
  background: var(--accent-pale);
  color: var(--accent);
  font-size: 9px;
  font-weight: 700;
  transform: translateY(-50%);
}

.field {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.field.is-hidden {
  display: none;
}

.field input {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  outline: 0;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.field input:focus {
  border-color: rgba(18, 63, 50, 0.46);
  box-shadow: 0 0 0 3px rgba(18, 63, 50, 0.08);
}

.pay-box {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

.pay-options {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pay-box .hint {
  margin: 0;
  font-size: 9px;
}

.cart-summary-list {
  display: grid;
  gap: 0;
  margin: 12px 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-md);
  background: var(--surface);
}

.cart-summary-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 38px;
  padding: 8px 11px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10px;
}

.cart-summary-list div:last-child {
  border-bottom: 0;
  color: var(--text);
}

.cart-summary-list strong {
  color: inherit;
  white-space: nowrap;
}

.discount-line strong {
  color: var(--accent);
}

.checkout-panel > .primary-button {
  width: 100%;
}

.status {
  min-height: 16px;
  margin: 8px 0 0;
  text-align: center;
}

.status[data-type="error"] {
  color: var(--danger);
}

.status[data-type="success"] {
  color: var(--accent);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 18px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
}

.modal.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.modal.is-visible .modal-backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(100%, 352px);
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--surface-strong);
  box-shadow: var(--shadow-elevated);
  transform: translateY(12px) scale(0.98);
  transition: transform 240ms cubic-bezier(0.22, 0.78, 0.28, 1);
}

.modal.is-visible .modal-card {
  transform: translateY(0) scale(1);
}

.modal-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 13px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: #fff;
}

.modal-mark svg {
  width: 22px;
  height: 22px;
}

.modal-card h2 {
  margin: 5px 0 8px;
  color: var(--accent-strong);
  font-family: var(--font-serif);
  font-size: 28px;
  line-height: 1.05;
}

.modal-card > p:not(.eyebrow) {
  margin: 0 0 16px;
  font-size: 11px;
  line-height: 1.55;
}

.modal-card .primary-button {
  width: 100%;
}

@keyframes panel-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cart-pulse {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.025); }
}

@media (max-width: 359px) {
  :root {
    --space: 12px;
  }

  .hero-copy h1 {
    font-size: 32px;
  }

  .hero-buttons {
    grid-template-columns: 1fr;
  }

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

  .menu-card {
    display: grid;
    grid-template-columns: 108px minmax(0, 1fr);
  }

  .menu-media {
    min-height: 142px;
    aspect-ratio: auto;
  }

  .menu-info {
    min-height: 142px;
  }

  .promo-card {
    flex-basis: calc(100vw - 46px);
  }

  .checkout-summary {
    width: calc(100% - 20px);
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }

  .profile-stats article:last-child {
    grid-column: auto;
  }
}

@media (min-width: 700px) {
  body {
    padding: 24px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 48px);
    border-radius: 30px;
  }

  .telegram-header {
    top: 24px;
    overflow: hidden;
    border-radius: 30px 30px 0 0;
  }

  .tabs {
    bottom: 24px;
    overflow: hidden;
    border-radius: 0 0 30px 30px;
  }

  .checkout-summary {
    bottom: calc(102px + env(safe-area-inset-bottom));
  }

  .checkout-panel {
    bottom: 24px;
    max-height: min(80dvh, 720px);
    border-radius: var(--radius-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
