/* Tuliplink — customer menu */
.menu-page {
  background:
    radial-gradient(900px 520px at 50% -160px, color-mix(in srgb, var(--accent) 14%, transparent), transparent 68%),
    radial-gradient(600px 400px at 100% 30%, color-mix(in srgb, var(--accent) 3%, transparent), transparent 70%),
    var(--bg);
  min-height: 100vh;
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
}

/* ---------- loading / error ---------- */
.loading,
.error-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 16px;
  padding: 32px;
}

.loading p {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
}

.loading-mark {
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-top-color: var(--accent-text);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.error-view h1 {
  font-family: var(--display);
  font-weight: 400;
  font-size: 42px;
}

.error-view .muted {
  max-width: 380px;
  font-size: 14px;
}

.error-view .btn {
  margin-top: 10px;
}

/* ---------- hero ---------- */
.hero {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 20px 0;
}

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

.hero-top .brandmark-mark {
  width: 22px;
  height: 22px;
}

.hero-top .brandmark-word {
  font-size: 16px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.14em;
}

.lang-switch button {
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.14em;
  padding: 6px 2px;
  transition: color 0.2s;
}

.lang-switch button:hover {
  color: var(--muted);
}

.lang-switch button[aria-pressed="true"] {
  color: var(--accent-text);
}

.brand {
  text-align: center;
  margin: 34px 0 26px;
}

.monogram {
  width: 62px;
  height: 62px;
  margin: 0 auto 20px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
  color: var(--accent-text);
  letter-spacing: 0.04em;
}

.brand-logo {
  width: 74px;
  height: 74px;
  margin: 0 auto 18px;
  object-fit: contain;
  border-radius: 50%;
}

.table-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent-text);
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
}

.brand h1 {
  font-family: var(--display);
  font-size: clamp(42px, 11vw, 66px);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: 0.005em;
  text-wrap: balance;
}

.tagline {
  margin: 10px auto 0;
  max-width: 460px;
  font-family: var(--display);
  font-style: italic;
  font-size: 18px;
  font-weight: 300;
  color: var(--muted);
  text-wrap: balance;
}

.brand-rule {
  width: 40px;
  height: 1px;
  margin: 24px auto 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

/* ---------- categories ---------- */
.cats {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 4px;
  margin: 0 -20px;
  padding: 14px 20px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  background: linear-gradient(to bottom, rgba(7, 8, 11, 0.97) 55%, rgba(7, 8, 11, 0.86) 85%, transparent);
  backdrop-filter: blur(10px);
}

.cats::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 9px 13px;
  border-radius: 999px;
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}

.cat-chip:hover {
  color: var(--muted);
}

.cat-chip[aria-current="true"] {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* ---------- sections ---------- */
.sections {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 20px 40px;
}

.menu-section {
  padding-top: 30px;
  scroll-margin-top: 62px;
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 6px;
}

.section-head h2 {
  font-family: var(--display);
  font-size: 29px;
  font-weight: 400;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.section-head .line {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.section-head .count {
  color: var(--faint);
  font-size: 10px;
  letter-spacing: 0.18em;
}

.item {
  display: flex;
  gap: 18px;
  padding: 19px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 7%, transparent);
}

.item:last-child {
  border-bottom: 0;
}

.item-body {
  flex: 1;
  min-width: 0;
}

.item-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.item-head h3 {
  font-family: var(--display);
  font-size: 21.5px;
  font-weight: 500;
  letter-spacing: 0.005em;
  line-height: 1.25;
}

.item-head .leader {
  flex: 1;
  min-width: 14px;
  border-bottom: 1px dotted color-mix(in srgb, var(--accent) 28%, transparent);
  transform: translateY(-4px);
}

.item-head .price {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 500;
  color: var(--accent-text);
  white-space: nowrap;
}

.item .desc {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13.3px;
  line-height: 1.55;
  max-width: 54ch;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.tag {
  padding: 2px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  border-radius: 999px;
  color: var(--accent-text);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.tag-featured {
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

.thumb {
  width: 74px;
  height: 74px;
  object-fit: cover;
  border-radius: 50%;
  border: 1px solid var(--line);
  flex: none;
  margin-top: 2px;
}

.item.sold-out .item-body {
  opacity: 0.48;
}

.item.sold-out .price {
  text-decoration: line-through;
  text-decoration-color: var(--faint);
}

.sold-badge {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, transparent);
}

.empty-note {
  padding: 40px 0;
  text-align: center;
  color: var(--faint);
  font-family: var(--display);
  font-size: 20px;
  font-style: italic;
}

/* ---------- footer ---------- */
.menu-foot {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px 20px;
  text-align: center;
  border-top: 1px solid color-mix(in srgb, var(--accent) 8%, transparent);
}

.menu-foot p {
  color: var(--faint);
  font-size: 11.5px;
  letter-spacing: 0.04em;
}

.foot-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--ink);
  opacity: 0.6;
  transition: opacity 0.2s;
}

.foot-mark:hover {
  opacity: 1;
}

.foot-mark .bm-link {
  color: var(--brand);
}

/* ---------- action bar ---------- */
.actionbar {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 40;
  display: flex;
  align-items: stretch;
  gap: 2px;
  width: min(420px, calc(100vw - 28px));
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 999px;
  background: rgba(19, 23, 32, 0.92);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 44px -14px rgba(0, 0, 0, 0.85);
}

.action {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 50px;
  padding: 6px 4px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s, background 0.2s;
}

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

.action:hover,
.action:focus-visible {
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 7%, transparent);
}

.action:first-child {
  color: var(--accent-bright);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
}

/* ---------- sheets ---------- */
.sheet {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 5, 8, 0.72);
  backdrop-filter: blur(4px);
  animation: fadeIn 0.25s ease;
}

.sheet-card {
  position: relative;
  width: min(430px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 28px 24px calc(26px + env(safe-area-inset-bottom));
  background: linear-gradient(170deg, #151a26 0%, #0c0f16 60%);
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 70px rgba(0, 0, 0, 0.6);
  animation: sheetUp 0.3s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.sheet-card h2 {
  font-family: var(--display);
  font-size: 31px;
  font-weight: 400;
  line-height: 1.1;
  margin-top: 6px;
}

.sheet-lede {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.sheet-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  font-size: 19px;
  line-height: 1;
  display: grid;
  place-items: center;
}

.sheet-close:hover {
  color: var(--accent-text);
  border-color: var(--line-strong);
}

.net-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.net-label {
  display: block;
  color: var(--faint);
  font-size: 9px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.net-name {
  display: block;
  margin-top: 3px;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.net-lock {
  color: var(--accent-text);
}

.net-lock svg {
  width: 21px;
  height: 21px;
}

.pass-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.018);
}

.pass-value {
  display: block;
  margin-top: 3px;
  font-size: 16px;
  color: var(--accent-bright);
}

#copyPass {
  margin-top: 16px;
}

.qr-block {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  text-align: center;
}

.qr-hint {
  color: var(--faint);
  font-size: 11px;
  letter-spacing: 0.02em;
  margin-bottom: 12px;
}

.wifi-qr {
  width: 152px;
  height: 152px;
  margin: 0 auto;
  padding: 9px;
  background: #fff;
  border-radius: 10px;
}

.qr-note {
  margin-top: 12px;
  color: var(--faint);
  font-size: 10.5px;
  line-height: 1.5;
}

/* waiter form */
#waiterForm {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  border-radius: 999px;
  padding: 7px 13px;
  font-size: 11px;
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--line-strong);
  color: var(--ink);
}

.chip[aria-pressed="true"] {
  border-color: var(--accent-text);
  color: var(--accent-text);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

@keyframes sheetUp {
  from { transform: translateY(26px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ---------- desktop ---------- */
@media (min-width: 640px) {
  .menu-page {
    padding-bottom: 120px;
  }

  .sheet {
    align-items: center;
  }

  .sheet-card {
    border-bottom: 1px solid var(--line-strong);
    border-radius: 16px;
    padding-bottom: 26px;
  }

  .brand {
    margin-top: 48px;
  }

  .item-head h3 {
    font-size: 23px;
  }

  .hero {
    padding-top: 30px;
  }
}

@media (max-width: 360px) {
  .item-head {
    flex-wrap: wrap;
  }
  .item-head .leader {
    display: none;
  }
  .item-head .price {
    margin-left: auto;
  }
}
