/* =========================================================
   烤馕点单 · 基础样式
   ========================================================= */
:root {
  --cream: #f7f0e4;
  --cream-2: #efe4d2;
  --paper: #fffdf8;
  --ink: #2e2116;
  --ink-2: #4b3929;
  --muted: #806d58;
  --muted-2: #9c8872;
  --line: #e9ddca;
  --line-strong: #d9c6a9;
  --brand: #bb4f2a;
  --brand-deep: #8d3617;
  --brand-soft: #f8e5d8;
  --gold: #dfa64f;
  --gold-deep: #b9822f;
  --gold-soft: #fbefd5;
  --green: #2f7452;
  --green-soft: #e6f1e8;
  --red: #af3b31;
  --red-soft: #f9e5e2;
  --blue: #326b8c;
  --blue-soft: #e6eff4;
  --shadow-sm: 0 4px 14px rgba(72, 48, 26, 0.06);
  --shadow-md: 0 14px 36px rgba(72, 48, 26, 0.1);
  --shadow-lg: 0 24px 70px rgba(55, 35, 18, 0.2);
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 30px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-serif: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  background: var(--cream);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.no-scroll {
  overflow: hidden;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 1.2;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

a {
  color: inherit;
  text-decoration: none;
}

img,
canvas {
  max-width: 100%;
}

svg {
  display: block;
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

[hidden] {
  display: none !important;
}

::selection {
  background: var(--gold);
  color: var(--ink);
}

:focus-visible {
  outline: 3px solid rgba(187, 79, 42, 0.35);
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.eyebrow {
  color: #eec987;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.eyebrow.dark {
  color: var(--brand);
}

.text-link {
  border: 0;
  background: none;
  color: var(--brand);
  font-size: 13px;
  font-weight: 650;
  padding: 4px;
}

.text-button {
  cursor: pointer;
}

.subtle-link {
  color: var(--muted-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* =========================================================
   按钮与表单
   ========================================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  line-height: 1.2;
  text-align: center;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:active {
  transform: translateY(1px) scale(0.995);
}

.btn:disabled {
  opacity: 0.55;
  transform: none;
}

.btn-primary {
  background: var(--brand);
  color: #fff8ee;
  border-color: var(--brand);
  box-shadow: 0 8px 18px rgba(187, 79, 42, 0.22);
}

.btn-primary:hover {
  background: var(--brand-deep);
  border-color: var(--brand-deep);
}

.btn-secondary {
  background: var(--gold-soft);
  border-color: #edd6a9;
  color: var(--ink-2);
}

.btn-secondary:hover {
  background: #f7e6c2;
}

.btn-ghost {
  background: rgba(255, 253, 248, 0.7);
  border-color: var(--line);
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--paper);
  border-color: var(--line-strong);
}

.btn-danger-text {
  color: var(--red);
}

.btn-sm {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 13px;
  border-radius: 10px;
}

.btn-block {
  width: 100%;
}

.btn-submit {
  min-width: 150px;
  min-height: 50px;
  border-radius: 14px;
  font-size: 15px;
}

.file-btn {
  position: relative;
  cursor: pointer;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.field-label i {
  color: var(--brand);
  font-style: normal;
}

.field input:not([type="checkbox"]):not([type="file"]),
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffcf6;
  padding: 11px 13px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.4;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.field textarea {
  resize: vertical;
  min-height: 70px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b0a08d;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(187, 79, 42, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(187, 79, 42, 0.09);
}

.field-help {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.form-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 13px;
  font-weight: 600;
}

.switch-label {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.switch-label input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.switch {
  position: relative;
  display: block;
  width: 42px;
  height: 25px;
  border-radius: 999px;
  background: #d9cdbb;
  transition: background 0.2s ease;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 5px rgba(42, 28, 16, 0.2);
  transition: transform 0.2s ease;
}

.switch-label input:checked + .switch,
.switch-label input:checked ~ .switch {
  background: var(--green);
}

.switch-label input:checked + .switch::after,
.switch-label input:checked ~ .switch::after {
  transform: translateX(17px);
}

.switch-label input:focus-visible + .switch,
.switch-label input:focus-visible ~ .switch {
  outline: 3px solid rgba(187, 79, 42, 0.35);
  outline-offset: 2px;
}

.switch-label-box {
  display: flex;
  justify-content: space-between;
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fdf8ef;
  white-space: normal;
}

.switch-label-box > span:first-child {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.switch-label-box small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

/* =========================================================
   顾客端 · 顶部
   ========================================================= */
.customer-page {
  background-color: var(--cream);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(120, 83, 44, 0.07) 1px, transparent 0),
    linear-gradient(180deg, rgba(255, 255, 255, 0.25), transparent 400px);
  background-size: 18px 18px, 100% 100%;
  padding-bottom: 114px;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: 24px 18px 26px;
  border-radius: 0 0 30px 30px;
  background: linear-gradient(145deg, #352317 0%, #53341f 52%, #744628 100%);
  color: #fff7e9;
  box-shadow: 0 18px 40px rgba(55, 34, 17, 0.18);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.48;
  background-image:
    radial-gradient(circle at 18% 20%, rgba(238, 190, 113, 0.22) 0 2px, transparent 2.5px),
    radial-gradient(circle at 78% 32%, rgba(238, 190, 113, 0.17) 0 1.5px, transparent 2px),
    radial-gradient(circle at 40% 74%, rgba(238, 190, 113, 0.16) 0 2px, transparent 2.5px);
  background-size: 34px 34px, 46px 46px, 62px 62px;
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(243, 204, 139, 0.16);
  border-radius: 50%;
  box-shadow: 0 0 0 28px rgba(243, 204, 139, 0.05), 0 0 0 58px rgba(243, 204, 139, 0.035);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: 0 auto;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.brand-seal {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 60px;
  height: 60px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 18px;
  background: linear-gradient(145deg, #f3c474, #d8993c);
  box-shadow: inset 0 0 0 3px rgba(255, 248, 236, 0.18), 0 8px 18px rgba(35, 20, 8, 0.2);
  color: #4a2a12;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
}

.brand-seal-sm {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 22px;
  box-shadow: inset 0 0 0 2px rgba(255, 248, 236, 0.2);
}

.hero-title {
  flex: 1;
  min-width: 0;
  padding-top: 1px;
}

.hero-title h1 {
  margin: 3px 0 4px;
  color: #fff8ec;
  font-family: var(--font-serif);
  font-size: clamp(25px, 6.8vw, 38px);
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 12px rgba(31, 17, 7, 0.18);
  word-break: break-word;
}

.shop-slogan {
  color: rgba(255, 246, 231, 0.72);
  font-size: 12.5px;
  line-height: 1.5;
}

.hero-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
  padding-top: 1px;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: none;
}

.hero-action {
  flex-direction: column;
  gap: 3px;
  width: 44px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.17);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 248, 236, 0.92);
  font-size: 10px;
  transition: background 0.15s ease;
}

.hero-action:hover {
  background: rgba(255, 255, 255, 0.17);
}

.hero-action svg {
  width: 18px;
  height: 18px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  color: rgba(255, 248, 236, 0.82);
  font-size: 11.5px;
  font-weight: 600;
}

.meta-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #8fd0a8;
  box-shadow: 0 0 0 3px rgba(143, 208, 168, 0.13);
}

.meta-pill.is-closed i {
  background: #e6a95e;
  box-shadow: 0 0 0 3px rgba(230, 169, 94, 0.13);
}

.meta-skeleton {
  width: 102px;
  height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  animation: pulse 1.4s ease-in-out infinite;
}

.announcement {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid rgba(239, 199, 130, 0.2);
  border-radius: 13px;
  background: rgba(252, 229, 184, 0.09);
  color: rgba(255, 247, 233, 0.82);
  font-size: 12px;
  line-height: 1.6;
}

.announcement-icon {
  flex: 0 0 auto;
  font-size: 13px;
}

.announcement p {
  min-width: 0;
}

/* =========================================================
   顾客端 · 菜单
   ========================================================= */
.menu-main {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 16px;
}

.menu-toolbar {
  position: sticky;
  top: 0;
  z-index: 30;
  margin: 0 -16px;
  padding: 11px 16px 9px;
  background: rgba(247, 240, 228, 0.9);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.category-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-tabs::-webkit-scrollbar {
  display: none;
}

.category-tab {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 7px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.7);
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.category-tab.active {
  border-color: var(--ink-2);
  background: var(--ink-2);
  color: #fff8ed;
  box-shadow: 0 5px 14px rgba(62, 42, 23, 0.15);
}

.menu-container {
  min-height: 260px;
  padding-top: 6px;
}

.closed-notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  margin: 12px 0 20px;
  padding: 18px;
  border: 1px solid #e5d2b4;
  border-radius: 18px;
  background:
    radial-gradient(circle at 100% 0, rgba(223, 166, 79, 0.16), transparent 50%),
    var(--paper);
  box-shadow: var(--shadow-sm);
}

.closed-notice > span {
  flex: 0 0 auto;
  font-size: 28px;
  line-height: 1.1;
}

.closed-notice strong {
  display: block;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 18px;
}

.closed-notice p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.65;
}

.load-error .btn {
  margin-top: 6px;
}

.menu-section {
  padding: 10px 0 16px;
}

.menu-section-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 2px 2px 10px;
}

.menu-section-head h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 800;
}

.menu-section-head span {
  color: var(--muted-2);
  font-size: 11px;
}

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

.menu-item {
  display: flex;
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(221, 204, 180, 0.9);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.92);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.menu-item:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.menu-item.is-sold-out {
  opacity: 0.68;
}

.item-thumb {
  position: relative;
  display: grid;
  flex: 0 0 68px;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid rgba(226, 198, 155, 0.55);
  border-radius: 17px;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.65), transparent 50%),
    linear-gradient(145deg, #f8e7c8, #eed1a0);
  font-size: 33px;
  line-height: 1;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.28);
}

.item-thumb.sold-out::after {
  content: "售罄";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 17px;
  background: rgba(49, 34, 21, 0.56);
  color: #fff8ed;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.item-content {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.item-name-row {
  display: flex;
  align-items: flex-start;
  gap: 6px;
}

.item-name {
  color: var(--ink);
  font-size: 16px;
  font-weight: 750;
  line-height: 1.3;
  word-break: break-word;
}

.item-desc {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.item-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 8px;
}

.item-price-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.item-price {
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.item-price small {
  margin-left: 2px;
  color: var(--muted-2);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0;
}

.promo-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid #efd6a4;
  border-radius: 5px;
  background: var(--gold-soft);
  color: #8a601c;
  font-size: 9.5px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}

.promo-tag::before {
  content: "惠";
  margin-right: 3px;
  color: var(--brand);
  font-size: 8px;
  font-weight: 800;
}

.qty-control {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.qty-btn {
  display: grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--ink-2);
  font-size: 17px;
  font-weight: 500;
  line-height: 1;
  transition: all 0.15s ease;
}

.qty-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.qty-btn.add {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 4px 10px rgba(187, 79, 42, 0.24);
}

.qty-btn.add:hover {
  background: var(--brand-deep);
  color: #fff;
}

.qty-btn:disabled {
  opacity: 0.4;
}

.qty-value {
  min-width: 17px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 750;
  text-align: center;
}

.sold-out-label {
  color: var(--muted-2);
  font-size: 11px;
  font-weight: 600;
}

.order-guide {
  margin: 10px 0 2px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 253, 248, 0.62);
}

.guide-title {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.guide-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.guide-step {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}

.guide-step b {
  display: grid;
  flex: 0 0 21px;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 10px;
  font-weight: 800;
}

.guide-step span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.guide-step strong {
  color: var(--ink-2);
  font-size: 11px;
}

.guide-step small {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 9px;
}

.customer-footer {
  padding: 25px 4px 16px;
  color: var(--muted-2);
  font-size: 11px;
  line-height: 1.9;
  text-align: center;
}

.customer-footer p {
  margin: 0;
}

/* =========================================================
   购物车
   ========================================================= */
.cart-bar {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  padding: 10px 14px calc(12px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(247, 240, 228, 0), rgba(247, 240, 228, 0.94) 38%);
  pointer-events: none;
}

.cart-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  max-width: 980px;
  min-height: 62px;
  margin: 0 auto;
  padding: 9px 10px 9px 18px;
  border: 0;
  border-radius: 18px;
  background: linear-gradient(120deg, #382619, #4d3320);
  box-shadow: 0 14px 34px rgba(50, 31, 15, 0.28);
  color: #fff8ed;
  text-align: left;
  pointer-events: auto;
  transition: transform 0.15s ease;
}

.cart-inner:active {
  transform: scale(0.993);
}

.cart-badge {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--gold);
  color: #3c2815;
  font-size: 13px;
  font-weight: 800;
}

.cart-info {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.cart-total {
  font-size: 18px;
  font-weight: 800;
}

.cart-hint {
  color: rgba(255, 248, 237, 0.58);
  font-size: 11px;
}

.cart-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 94px;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, #efc373, #dca64e);
  color: #3c2815;
  font-size: 14px;
  font-weight: 800;
}

.cart-cta.is-disabled {
  background: rgba(255, 255, 255, 0.14);
  color: rgba(255, 248, 237, 0.62);
}

/* =========================================================
   底部弹层 / 结算
   ========================================================= */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(35, 23, 13, 0.5);
  opacity: 0;
  visibility: hidden;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.sheet-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.sheet {
  position: fixed;
  bottom: 0;
  left: 50%;
  z-index: 100;
  display: flex;
  flex-direction: column;
  width: min(660px, 100%);
  max-height: 92vh;
  max-height: min(92dvh, 920px);
  border-radius: 28px 28px 0 0;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  transform: translate(-50%, 104%);
  visibility: hidden;
  transition: transform 0.28s cubic-bezier(0.22, 0.8, 0.3, 1), visibility 0.28s;
}

.sheet.open {
  transform: translate(-50%, 0);
  visibility: visible;
}

.sheet-grab {
  width: 42px;
  height: 4px;
  margin: 9px auto 0;
  border-radius: 999px;
  background: #e3d5c2;
}

.sheet-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 22px 10px;
  border-bottom: 1px solid rgba(233, 221, 202, 0.7);
}

.sheet-kicker {
  color: var(--brand);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.18em;
}

.sheet-head h2 {
  margin-top: 2px;
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 800;
}

.round-btn {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: #fffaf1;
  color: var(--muted);
}

.round-btn svg {
  width: 17px;
  height: 17px;
}

.sheet-form {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.sheet-body {
  overflow-y: auto;
  padding: 6px 22px 22px;
  -webkit-overflow-scrolling: touch;
}

.checkout-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px dashed var(--line);
}

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

.checkout-thumb {
  display: grid;
  flex: 0 0 45px;
  place-items: center;
  width: 45px;
  height: 45px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f8e7c8, #eed1a0);
  font-size: 22px;
}

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

.checkout-item-name {
  font-size: 14px;
  font-weight: 700;
}

.checkout-item-price {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11.5px;
}

.checkout-item-total {
  width: 66px;
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 700;
  text-align: right;
}

.min-order-tip {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--gold-soft);
  color: #856022;
  font-size: 12px;
  font-weight: 600;
}

.sheet-body .form-grid {
  margin-top: 20px;
}

.pay-callout {
  display: flex;
  gap: 11px;
  margin-top: 18px;
  padding: 13px;
  border: 1px solid #efd9b4;
  border-radius: 14px;
  background: linear-gradient(135deg, #fdf5e4, #fbf0d8);
}

.pay-callout-icon {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #fff9ed;
  font-size: 18px;
}

.pay-callout strong {
  display: block;
  color: #6d4b1e;
  font-size: 13px;
}

.pay-callout p {
  margin-top: 2px;
  color: #8a6b3a;
  font-size: 11.5px;
  line-height: 1.6;
}

.totals-box {
  margin-top: 16px;
  padding: 13px 14px;
  border-radius: 14px;
  background: #fbf6ec;
}

.total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 3px 0;
  color: var(--muted);
  font-size: 12.5px;
}

.total-row-discount {
  color: var(--green);
}

.total-row-discount span:last-child {
  font-weight: 700;
}

.total-row-main {
  margin-top: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: 15px;
  font-weight: 750;
}

.total-row-main span:last-child {
  color: var(--brand);
  font-size: 20px;
  font-weight: 800;
}

.sheet-foot {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 22px calc(14px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.97);
}

.sheet-foot-total {
  display: flex;
  flex: 1;
  flex-direction: column;
  line-height: 1.25;
}

.sheet-foot-total span {
  color: var(--muted);
  font-size: 10px;
}

.foot-saving {
  margin-left: 4px;
  color: var(--green);
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
}

.sheet-foot-total strong {
  color: var(--brand);
  font-size: 21px;
  font-weight: 800;
}

/* =========================================================
   公共 · 加载 / 空状态 / Toast
   ========================================================= */
.loading-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 220px;
  color: var(--muted);
  font-size: 12.5px;
}

.loading-ring {
  width: 30px;
  height: 30px;
  border: 3px solid rgba(187, 79, 42, 0.15);
  border-top-color: var(--brand);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 240px;
  padding: 30px 20px;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  background: rgba(255, 253, 248, 0.55);
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  font-size: 38px;
  line-height: 1;
}

.empty-state h3 {
  color: var(--ink-2);
  font-size: 17px;
}

.empty-state p {
  max-width: 300px;
  font-size: 12px;
  line-height: 1.7;
}

.toast {
  position: fixed;
  top: calc(14px + env(safe-area-inset-top, 0px));
  left: 50%;
  z-index: 500;
  max-width: min(88vw, 420px);
  padding: 10px 16px;
  border-radius: 999px;
  background: rgba(43, 29, 17, 0.94);
  box-shadow: 0 10px 30px rgba(40, 25, 12, 0.25);
  color: #fff8ed;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  background: rgba(143, 42, 35, 0.96);
}

.noscript {
  position: fixed;
  right: 16px;
  bottom: 16px;
  left: 16px;
  z-index: 999;
  padding: 14px;
  border-radius: 14px;
  background: var(--red);
  color: #fff;
  text-align: center;
}

/* =========================================================
   订单详情页
   ========================================================= */
.order-page {
  padding-bottom: 50px;
}

.simple-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 14px 18px;
}

.simple-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.order-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 4px 16px 24px;
}

.status-card {
  position: relative;
  overflow: hidden;
  padding: 23px 22px;
  border-radius: 26px;
  background: linear-gradient(135deg, #3b2819, #5b3b23);
  box-shadow: 0 18px 40px rgba(56, 36, 18, 0.18);
  color: #fff8ec;
}

.status-card::after {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  box-shadow: 0 0 0 30px rgba(255, 255, 255, 0.035), 0 0 0 62px rgba(255, 255, 255, 0.025);
  pointer-events: none;
}

.status-card[data-status="payment_review"] {
  background: linear-gradient(135deg, #58401d, #87622a);
}

.status-card[data-status="paid"] {
  background: linear-gradient(135deg, #3a2d19, #6f5327);
}

.status-card[data-status="delivering"] {
  background: linear-gradient(135deg, #233d35, #346b58);
}

.status-card[data-status="completed"] {
  background: linear-gradient(135deg, #274137, #3d745d);
}

.status-card[data-status="cancelled"] {
  background: linear-gradient(135deg, #43403b, #66625b);
}

.status-card-main {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.status-icon {
  display: grid;
  flex: 0 0 54px;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 17px;
  background: rgba(255, 255, 255, 0.12);
  font-size: 27px;
  line-height: 1;
}

.status-label {
  color: rgba(255, 248, 236, 0.62);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
}

.status-card h1 {
  margin-top: 3px;
  color: #fff8ec;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 800;
}

.status-hint {
  position: relative;
  z-index: 1;
  margin-top: 14px;
  color: rgba(255, 248, 236, 0.72);
  font-size: 12px;
  line-height: 1.7;
}

.status-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 15px;
}

.status-chip {
  padding: 4px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 248, 236, 0.72);
  font-size: 10.5px;
  font-weight: 600;
}

.new-order-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 13px 0 0;
  padding: 10px 13px;
  border: 1px solid #efd7ac;
  border-radius: 13px;
  background: var(--gold-soft);
  color: #78581e;
  font-size: 12px;
  font-weight: 600;
}

.payment-panel {
  margin-top: 14px;
  padding: 20px;
  border: 1px solid #ead3ab;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0, rgba(239, 195, 116, 0.15), transparent 40%),
    var(--paper);
  box-shadow: var(--shadow-sm);
}

.payment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.payment-head h2 {
  font-size: 17px;
  font-weight: 800;
}

.payment-head p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11.5px;
}

.payment-amount {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 25px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.qr-frame {
  display: flex;
  justify-content: center;
  margin: 15px 0 10px;
}

.qr-frame-inner {
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(60, 40, 20, 0.1);
}

.qr-frame img {
  display: block;
  width: min(230px, 62vw);
  height: min(230px, 62vw);
  object-fit: contain;
  border-radius: 8px;
}

.qr-caption {
  margin: 0 auto;
  max-width: 310px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: center;
}

.qr-caption strong {
  color: var(--ink-2);
}

.payment-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 15px;
}

.payment-actions .btn {
  min-height: 46px;
}

.payment-review-state {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 13px;
  padding: 11px 12px;
  border-radius: 12px;
  background: var(--gold-soft);
  color: #7f601f;
  font-size: 12px;
  font-weight: 600;
}

.no-qr-box {
  margin: 14px 0;
  padding: 18px;
  border: 1px dashed var(--line-strong);
  border-radius: 15px;
  background: #fbf6ec;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
  text-align: center;
}

.proof-preview {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbf6ec;
}

.proof-preview img {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  object-fit: cover;
}

.proof-preview p {
  color: var(--muted);
  font-size: 11px;
}

.order-card {
  margin-top: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

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

.card-head h2 {
  font-size: 15px;
  font-weight: 800;
}

.card-head span {
  color: var(--muted-2);
  font-size: 11px;
}

.order-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
  border-bottom: 1px dashed rgba(233, 221, 202, 0.8);
  font-size: 13px;
}

.order-line:last-child {
  border-bottom: 0;
}

.order-line-main {
  display: flex;
  min-width: 0;
  gap: 9px;
}

.order-line-emoji {
  font-size: 18px;
  line-height: 1.4;
}

.order-line-name {
  color: var(--ink-2);
  font-weight: 600;
}

.order-line-unit {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.order-line-price {
  flex: 0 0 auto;
  color: var(--ink-2);
  font-weight: 650;
}

.order-totals {
  margin-top: 7px;
  padding-top: 9px;
  border-top: 1px solid var(--line);
}

.order-total-row {
  display: flex;
  justify-content: space-between;
  padding: 3px 0;
  color: var(--muted);
  font-size: 12px;
}

.order-total-row.discount {
  color: var(--green);
}

.order-total-row.discount span:last-child {
  font-weight: 700;
}

.order-total-row.grand {
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.order-total-row.grand span:last-child {
  color: var(--brand);
  font-size: 19px;
}

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

.info-item {
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: #fbf6ec;
}

.info-item.wide {
  grid-column: 1 / -1;
}

.info-label {
  color: var(--muted-2);
  font-size: 10px;
}

.info-value {
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  word-break: break-word;
}

.info-value a {
  color: var(--brand);
}

.order-note {
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid var(--gold);
  border-radius: 0 10px 10px 0;
  background: #fdf7ea;
  color: #745a2b;
  font-size: 12px;
  line-height: 1.6;
}

.timeline {
  position: relative;
  margin-top: 4px;
  padding-left: 4px;
}

.timeline-item {
  position: relative;
  display: flex;
  gap: 12px;
  min-height: 44px;
  padding-bottom: 14px;
}

.timeline-item:last-child {
  min-height: 0;
  padding-bottom: 0;
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 0 0 18px;
  place-items: center;
  width: 18px;
  height: 18px;
  margin-top: 1px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
  background: var(--paper);
}

.timeline-item:not(:last-child) .timeline-dot::after {
  content: "";
  position: absolute;
  top: 17px;
  left: 50%;
  width: 1px;
  height: 39px;
  background: var(--line);
  transform: translateX(-50%);
}

.timeline-item.done .timeline-dot {
  border-color: var(--green);
  background: var(--green);
}

.timeline-item.done .timeline-dot::before {
  content: "";
  width: 5px;
  height: 8px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.timeline-item.active .timeline-dot {
  border-color: var(--brand);
  background: var(--brand);
  box-shadow: 0 0 0 4px rgba(187, 79, 42, 0.12);
}

.timeline-content {
  flex: 1;
  min-width: 0;
}

.timeline-title {
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 650;
}

.timeline-item.done .timeline-title,
.timeline-item.active .timeline-title {
  color: var(--ink-2);
}

.timeline-time {
  margin-top: 1px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.order-helper {
  margin-top: 20px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.8;
  text-align: center;
}

.error-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 22px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--paper);
  text-align: center;
}

.error-state .empty-state-icon {
  font-size: 42px;
}

.error-state h1 {
  font-size: 20px;
}

.error-state p {
  max-width: 320px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

/* =========================================================
   我的订单
   ========================================================= */
.my-orders-page {
  padding-bottom: 50px;
}

.orders-main {
  max-width: 760px;
  margin: 0 auto;
  padding: 8px 16px 24px;
}

.page-title-block {
  padding: 14px 4px 22px;
}

.page-title-block h1 {
  margin: 4px 0 6px;
  font-family: var(--font-serif);
  font-size: 31px;
  font-weight: 800;
}

.page-title-block > p:last-child {
  color: var(--muted);
  font-size: 12px;
}

.local-order-card {
  display: block;
  margin-bottom: 11px;
  padding: 16px 17px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.local-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.local-order-no {
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 750;
}

.local-order-time {
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 10.5px;
}

.local-order-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 11px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

.local-order-summary {
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.local-order-total {
  flex: 0 0 auto;
  color: var(--brand);
  font-size: 17px;
  font-weight: 800;
}

.local-order-invalid {
  opacity: 0.65;
}

/* =========================================================
   状态徽章
   ========================================================= */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 23px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 750;
  white-space: nowrap;
}

.badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.badge-pending_payment {
  background: #fdf0d7;
  color: #95631e;
}

.badge-payment_review {
  background: #fbe6d6;
  color: #a84f20;
}

.badge-paid {
  background: var(--gold-soft);
  color: #86601e;
}

.badge-delivering {
  background: var(--blue-soft);
  color: var(--blue);
}

.badge-completed {
  background: var(--green-soft);
  color: var(--green);
}

.badge-cancelled {
  background: #eeeae3;
  color: #777068;
}

/* =========================================================
   后台 · 登录
   ========================================================= */
.admin-page {
  background: #f4efe6;
  padding-bottom: 0;
}

.login-view {
  position: relative;
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  padding: 24px;
  background: linear-gradient(145deg, #2f2015 0%, #4d3220 54%, #70442a 100%);
}

.login-art {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.login-ring {
  position: absolute;
  border: 1px solid rgba(244, 210, 151, 0.12);
  border-radius: 50%;
}

.login-ring-1 {
  top: -160px;
  right: -100px;
  width: 520px;
  height: 520px;
  box-shadow: 0 0 0 55px rgba(244, 210, 151, 0.035), 0 0 0 110px rgba(244, 210, 151, 0.02);
}

.login-ring-2 {
  bottom: -220px;
  left: -180px;
  width: 520px;
  height: 520px;
  box-shadow: 0 0 0 45px rgba(244, 210, 151, 0.025);
}

.login-seal {
  position: absolute;
  top: 11%;
  left: 50%;
  color: rgba(241, 198, 124, 0.1);
  font-family: var(--font-serif);
  font-size: min(54vw, 540px);
  font-weight: 800;
  line-height: 1;
  transform: translateX(-50%) rotate(-7deg);
  user-select: none;
}

.login-card {
  position: relative;
  z-index: 1;
  width: min(100%, 405px);
  padding: 34px 30px 28px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 26px;
  background: var(--paper);
  box-shadow: 0 30px 80px rgba(23, 13, 5, 0.36);
}

.login-card h1 {
  margin: 5px 0 4px;
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 800;
}

.login-subtitle {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 13px;
}

.login-card .field {
  margin-bottom: 11px;
}

.login-card .btn {
  min-height: 48px;
  margin-top: 6px;
}

.login-hint {
  margin-top: 16px;
  color: var(--muted-2);
  font-size: 10.5px;
  line-height: 1.7;
}

.login-hint code {
  padding: 1px 4px;
  border-radius: 4px;
  background: #f1e8da;
  color: var(--ink-2);
  font-size: 10px;
}

.login-back {
  display: inline-block;
  margin-top: 18px;
  color: var(--muted);
  font-size: 11.5px;
}

/* =========================================================
   后台 · 框架
   ========================================================= */
#dashboardView {
  min-height: 100vh;
}

.admin-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(224, 210, 190, 0.8);
  background: rgba(255, 253, 248, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
}

.admin-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 20px;
}

.admin-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.admin-brand > span:last-child {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.3;
}

.admin-brand strong {
  font-family: var(--font-serif);
  font-size: 17px;
  font-weight: 800;
}

.admin-brand small {
  overflow: hidden;
  max-width: 220px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-header-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.open-badge i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

.open-badge.closed {
  background: #f2ece2;
  color: #847766;
}

.admin-top-tabs {
  display: flex;
  gap: 4px;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.admin-tab-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 12px 13px 11px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.admin-tab-btn::after {
  content: "";
  position: absolute;
  right: 12px;
  bottom: -1px;
  left: 12px;
  height: 2px;
  border-radius: 2px;
  background: transparent;
}

.admin-tab-btn.active {
  color: var(--ink);
}

.admin-tab-btn.active::after {
  background: var(--brand);
}

.tab-badge,
.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

.admin-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 20px 70px;
}

.admin-tab {
  animation: fade-in 0.2s ease;
}

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

.admin-bottom-nav {
  display: none;
}

.setup-alert {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  padding: 11px 14px;
  border: 1px solid #efd4a6;
  border-radius: 13px;
  background: var(--gold-soft);
  color: #775719;
  font-size: 12px;
}

.setup-alert p {
  flex: 1;
}

.setup-alert .text-link {
  flex: 0 0 auto;
  color: #775719;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 11px;
}

.stat-card {
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.stat-card-brand {
  border-color: #e5c989;
  background:
    radial-gradient(circle at 100% 0, rgba(228, 178, 91, 0.22), transparent 55%),
    var(--paper);
}

.stat-label {
  display: block;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
}

.stat-card strong {
  display: inline-block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-card-brand strong {
  color: var(--brand);
}

.stat-note {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 9.5px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 248, 0.85);
  box-shadow: var(--shadow-sm);
}

.segmented {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 2px;
  padding: 3px;
  border-radius: 9px;
  background: #f0e8db;
}

.segmented button {
  min-height: 29px;
  padding: 4px 10px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.segmented button.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 6px rgba(59, 41, 23, 0.09);
}

.select-wrap select {
  min-height: 36px;
  padding: 6px 28px 6px 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffcf6;
  color: var(--ink-2);
  font-size: 11.5px;
  outline: none;
}

.search-box {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 6px;
  min-width: 150px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fffcf6;
}

.search-box svg {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  color: var(--muted-2);
}

.search-box input {
  width: 100%;
  min-height: 34px;
  border: 0;
  background: transparent;
  font-size: 11.5px;
  outline: none;
}

.filter-bar .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

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

.admin-order {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.admin-order:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.admin-order[data-status="pending_payment"] {
  border-left-color: #cfa258;
}

.admin-order[data-status="payment_review"] {
  border-left-color: var(--brand);
  background: linear-gradient(110deg, #fffdf8, #fff9f0);
}

.admin-order[data-status="paid"] {
  border-left-color: var(--gold-deep);
}

.admin-order[data-status="delivering"] {
  border-left-color: var(--blue);
}

.admin-order[data-status="completed"] {
  border-left-color: var(--green);
}

.admin-order[data-status="cancelled"] {
  border-left-color: #b9b0a4;
  opacity: 0.78;
}

.admin-order-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.order-no-group {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.order-no {
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.order-time {
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.proof-dot {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: 5px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 9px;
  font-weight: 700;
}

.admin-customer-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 10px;
  font-size: 12.5px;
}

.admin-customer-line strong {
  font-size: 13px;
}

.admin-customer-line a {
  color: var(--brand);
  font-size: 11.5px;
}

.admin-address {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.55;
}

.admin-address span {
  color: var(--ink-2);
  word-break: break-word;
}

.admin-items-summary {
  overflow: hidden;
  color: var(--ink-2);
  font-size: 11.5px;
  line-height: 1.55;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-order-note {
  display: -webkit-box;
  overflow: hidden;
  padding: 7px 9px;
  border-radius: 8px;
  background: #fdf6e8;
  color: #80602b;
  font-size: 10.5px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.admin-order-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: auto;
  padding-top: 6px;
  border-top: 1px dashed var(--line);
}

.admin-order-total {
  color: var(--brand);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.admin-order-total small {
  margin-left: 4px;
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 500;
}

.order-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.order-actions .btn {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 11px;
  border-radius: 8px;
}

.admin-empty {
  grid-column: 1 / -1;
}

/* 后台 · 菜单 */
.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 15px;
}

.section-heading h2 {
  margin: 3px 0 4px;
  font-family: var(--font-serif);
  font-size: 27px;
  font-weight: 800;
}

.section-heading p:last-child {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.6;
}

.section-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.menu-admin-group {
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.menu-admin-group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  background: #fbf6ec;
}

.menu-admin-group-title {
  flex: 1;
  min-width: 0;
}

.menu-admin-group-title strong {
  font-family: var(--font-serif);
  font-size: 16px;
}

.menu-admin-group-title span {
  margin-left: 5px;
  color: var(--muted-2);
  font-size: 10px;
}

.icon-action {
  display: inline-grid;
  place-items: center;
  width: 29px;
  height: 29px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffcf6;
  color: var(--muted);
  font-size: 12px;
  line-height: 1;
}

.icon-action:hover {
  border-color: var(--line-strong);
  color: var(--ink-2);
}

.icon-action.danger:hover {
  border-color: #ecc3bd;
  color: var(--red);
}

.menu-admin-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-bottom: 1px solid rgba(233, 221, 202, 0.65);
}

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

.menu-admin-thumb {
  display: grid;
  flex: 0 0 38px;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(145deg, #f8e7c8, #eed1a0);
  font-size: 19px;
}

.menu-admin-info {
  flex: 1;
  min-width: 0;
}

.menu-admin-info strong {
  display: block;
  font-size: 12.5px;
}

.menu-admin-info small {
  display: block;
  overflow: hidden;
  color: var(--muted-2);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-admin-price {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 750;
}

.promo-mini {
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--gold-soft);
  color: #8a601c;
  font-size: 8.5px;
  font-weight: 650;
}

.availability-pill {
  flex: 0 0 auto;
  padding: 3px 7px;
  border: 0;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 9px;
  font-weight: 700;
}

.availability-pill.off {
  background: #f0ebe2;
  color: #8c7e6d;
}

.menu-admin-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 4px;
}

.menu-empty-line {
  padding: 18px 14px;
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

/* 后台 · 设置 */
.admin-form {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.admin-panel {
  margin-bottom: 13px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.panel-heading {
  margin-bottom: 15px;
}

.panel-heading h3 {
  margin-bottom: 4px;
  font-size: 15px;
  font-weight: 800;
}

.panel-heading p {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 15px;
}

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

.qr-admin-layout {
  display: flex;
  align-items: flex-start;
  gap: 18px;
}

.qr-admin-preview {
  display: flex;
  flex: 0 0 145px;
  align-items: center;
  justify-content: center;
  width: 145px;
  height: 145px;
  padding: 8px;
  border: 1px dashed var(--line-strong);
  border-radius: 14px;
  background: #fbf6ec;
  overflow: hidden;
}

.qr-admin-preview img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
}

.qr-placeholder {
  color: var(--muted-2);
  font-size: 11px;
  text-align: center;
}

.qr-admin-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.qr-admin-controls .field-help {
  flex-basis: 100%;
}

.site-qr-layout {
  display: flex;
  align-items: center;
  gap: 20px;
}

.site-qr-box {
  display: grid;
  flex: 0 0 200px;
  place-items: center;
  width: 200px;
  height: 200px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: inset 0 0 0 6px #fff;
}

.site-qr-box canvas {
  width: 100%;
  height: 100%;
}

.site-qr-info {
  flex: 1;
  min-width: 0;
}

.site-url {
  overflow-wrap: anywhere;
  margin-bottom: 9px;
  color: var(--ink-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}

.qr-local-warning {
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--gold-soft);
  color: #7d5c21;
  font-size: 10.5px;
  line-height: 1.6;
}

.admin-version {
  padding: 6px 0 12px;
  color: var(--muted-2);
  font-size: 10px;
  text-align: center;
}

/* =========================================================
   后台 · 弹窗
   ========================================================= */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(35, 23, 13, 0.55);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}

.modal {
  width: min(100%, 640px);
  max-height: 90vh;
  max-height: min(90dvh, 900px);
  overflow-y: auto;
  border-radius: 22px;
  background: var(--paper);
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.22s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 17px 18px 13px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.97);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.modal-head h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 800;
}

.modal-head p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10.5px;
}

.modal-body {
  padding: 16px 18px 20px;
}

.modal-section {
  margin-bottom: 16px;
}

.modal-section h3 {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

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

.modal-info {
  padding: 9px 10px;
  border-radius: 9px;
  background: #fbf6ec;
  min-width: 0;
}

.modal-info span {
  display: block;
  color: var(--muted-2);
  font-size: 9px;
}

.modal-info strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.5;
  word-break: break-word;
}

.modal-info.wide {
  grid-column: 1 / -1;
}

.modal-link-button {
  margin-top: 8px;
}

.modal-items {
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.modal-item-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border-bottom: 1px dashed var(--line);
  font-size: 11.5px;
}

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

.modal-item-line.discount {
  color: var(--green);
  font-weight: 650;
}

.modal-total {
  display: flex;
  justify-content: space-between;
  padding-top: 9px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}

.modal-total strong {
  color: var(--brand);
  font-size: 18px;
}

.modal-proof {
  display: block;
  max-width: 230px;
  margin-top: 7px;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
}

.modal-history {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.history-chip {
  padding: 3px 8px;
  border-radius: 999px;
  background: #f2ebe0;
  color: var(--muted);
  font-size: 9px;
}

.modal-admin-note {
  width: 100%;
  min-height: 64px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fffcf6;
  padding: 9px 10px;
  font-size: 12px;
  resize: vertical;
}

.modal-foot {
  position: sticky;
  bottom: 0;
  z-index: 2;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  padding: 12px 18px calc(12px + var(--safe-bottom));
  border-top: 1px solid var(--line);
  background: rgba(255, 253, 248, 0.97);
}

.modal-foot .btn {
  min-height: 36px;
  font-size: 12px;
}

.modal-actions-spread {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  width: 100%;
}

.modal-actions-spread .spacer {
  flex: 1;
}

/* =========================================================
   二维码海报
   ========================================================= */
.qr-page {
  background-color: var(--cream);
  background-image: radial-gradient(circle at 1px 1px, rgba(120, 83, 44, 0.08) 1px, transparent 0);
  background-size: 20px 20px;
  padding-bottom: 30px;
}

.qr-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
}

.qr-sheet-wrap {
  padding: 0 16px 24px;
}

.qr-poster {
  max-width: 560px;
  margin: 0 auto;
  padding: 34px 34px 24px;
  border: 1px solid #e4d4bd;
  border-radius: 6px;
  background:
    radial-gradient(circle at 8% 8%, rgba(224, 166, 79, 0.12), transparent 22%),
    radial-gradient(circle at 92% 88%, rgba(224, 166, 79, 0.12), transparent 22%),
    var(--paper);
  box-shadow: 0 20px 60px rgba(71, 48, 25, 0.14);
}

.qr-poster-head {
  display: flex;
  align-items: center;
  gap: 15px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.qr-poster-head h1 {
  margin: 3px 0;
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 800;
}

.qr-poster-head p:last-child {
  color: var(--muted);
  font-size: 12px;
}

.qr-poster-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 0 20px;
}

.qr-call {
  color: var(--brand);
  font-family: var(--font-serif);
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.qr-canvas-frame {
  margin-top: 15px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 12px 30px rgba(65, 43, 20, 0.1);
}

.qr-canvas-frame canvas {
  display: block;
  width: min(330px, 68vw);
  height: min(330px, 68vw);
}

.qr-steps {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px 15px;
  margin-top: 18px;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
}

.qr-url {
  margin-top: 12px;
  color: var(--muted-2);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 9.5px;
  word-break: break-all;
  text-align: center;
}

.qr-poster-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
  color: var(--muted-2);
  font-size: 9.5px;
}

/* =========================================================
   响应式
   ========================================================= */
@media (max-width: 900px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .orders-list {
    grid-template-columns: 1fr;
  }

  .compact-form .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .menu-grid {
    grid-template-columns: 1fr;
  }

  #dashboardView {
    padding-bottom: 76px;
  }

  .admin-header-inner {
    padding: 9px 14px;
  }

  .admin-header-actions {
    gap: 6px;
  }

  .admin-header-actions .preview-link {
    display: none;
  }

  .admin-header-actions .open-badge {
    display: none;
  }

  .admin-top-tabs {
    display: none;
  }

  .admin-main {
    padding: 14px 12px 30px;
  }

  .admin-bottom-nav {
    position: fixed;
    right: 10px;
    bottom: calc(9px + var(--safe-bottom));
    left: 10px;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3px;
    max-width: 520px;
    margin: 0 auto;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.95);
    box-shadow: 0 12px 36px rgba(55, 35, 18, 0.17);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
  }

  .admin-bottom-nav button {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    min-height: 46px;
    padding: 5px;
    border: 0;
    border-radius: 11px;
    background: transparent;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 650;
  }

  .admin-bottom-nav button.active {
    background: #f5ecde;
    color: var(--brand);
  }

  .admin-bottom-nav svg {
    width: 18px;
    height: 18px;
  }

  .admin-bottom-nav .nav-badge {
    position: absolute;
    top: 1px;
    left: calc(50% + 4px);
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-box {
    flex-basis: 100%;
    order: 5;
  }

  .filter-bar .sound-btn {
    margin-left: auto;
  }

  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .section-actions {
    width: 100%;
  }

  .section-actions .btn {
    flex: 1;
  }

  .site-qr-layout,
  .qr-admin-layout {
    flex-direction: column;
    align-items: stretch;
  }

  .site-qr-box {
    flex: none;
    align-self: center;
  }

  .qr-admin-preview {
    align-self: center;
  }

  .modal-backdrop {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-height: 94vh;
    max-height: 94dvh;
    border-radius: 22px 22px 0 0;
  }

  .modal-foot {
    padding-bottom: calc(13px + var(--safe-bottom));
  }

  .admin-brand small {
    max-width: 130px;
  }

  .stat-card {
    padding: 13px;
  }

  .stat-card strong {
    font-size: 24px;
  }
}

@media (max-width: 560px) {
  body {
    font-size: 14px;
  }

  .customer-page {
    padding-bottom: 106px;
  }

  .hero {
    padding: 20px 15px 22px;
    border-radius: 0 0 26px 26px;
  }

  .brand-seal {
    width: 52px;
    height: 52px;
    border-radius: 15px;
    font-size: 28px;
  }

  .brand-seal-sm {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 20px;
  }

  .hero-title h1 {
    font-size: clamp(20px, 5.9vw, 27px);
    letter-spacing: -0.01em;
  }

  .hero-action {
    width: 40px;
    height: 45px;
  }

  .menu-main {
    padding: 0 12px;
  }

  .menu-toolbar {
    margin: 0 -12px;
    padding-right: 12px;
    padding-left: 12px;
  }

  .menu-item {
    padding: 12px;
  }

  .item-thumb {
    flex-basis: 62px;
    width: 62px;
    height: 62px;
    border-radius: 15px;
    font-size: 30px;
  }

  .cart-bar {
    padding-right: 10px;
    padding-left: 10px;
  }

  .cart-inner {
    padding-left: 13px;
    border-radius: 16px;
  }

  .cart-cta {
    min-width: 82px;
    padding: 0 13px;
  }

  .sheet {
    max-height: 94vh;
    max-height: 94dvh;
  }

  .sheet-head {
    padding-right: 17px;
    padding-left: 17px;
  }

  .sheet-body {
    padding-right: 17px;
    padding-left: 17px;
  }

  .sheet-foot {
    padding-right: 17px;
    padding-left: 17px;
  }

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

  .field-wide {
    grid-column: auto;
  }

  .sheet-body .form-grid {
    gap: 11px;
  }

  .sheet-foot-total strong {
    font-size: 19px;
  }

  .btn-submit {
    min-width: 128px;
    min-height: 48px;
  }

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

  .status-card {
    padding: 19px 17px;
    border-radius: 22px;
  }

  .status-card h1 {
    font-size: 24px;
  }

  .status-icon {
    flex-basis: 48px;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 24px;
  }

  .payment-panel,
  .order-card {
    padding: 15px;
    border-radius: 17px;
  }

  .payment-amount {
    font-size: 22px;
  }

  .qr-frame img {
    width: min(220px, 64vw);
    height: min(220px, 64vw);
  }

  .login-view {
    padding: 14px;
  }

  .login-card {
    padding: 27px 20px 22px;
    border-radius: 22px;
  }

  .login-card h1 {
    font-size: 28px;
  }

  .admin-header-actions .btn {
    padding-right: 8px;
    padding-left: 8px;
  }

  .admin-brand small {
    max-width: 100px;
  }

  .admin-brand strong {
    font-size: 15px;
  }

  .admin-order {
    padding: 13px;
  }

  .filter-bar {
    padding: 7px;
  }

  .segmented {
    flex: 1;
    justify-content: space-between;
  }

  .segmented button {
    flex: 1;
  }

  .filter-bar .select-wrap {
    flex: 1;
  }

  .select-wrap select {
    width: 100%;
  }

  .menu-admin-item {
    flex-wrap: wrap;
    gap: 7px;
  }

  .menu-admin-info {
    min-width: calc(100% - 140px);
  }

  .menu-admin-actions {
    margin-left: auto;
  }

  .qr-poster {
    padding: 22px 18px 18px;
  }

  .qr-poster-head {
    gap: 10px;
    padding-bottom: 15px;
  }

  .qr-poster-head h1 {
    font-size: 25px;
  }

  .qr-poster-head .brand-seal {
    width: 46px;
    height: 46px;
    font-size: 24px;
  }

  .qr-call {
    font-size: 20px;
  }

  .qr-poster-foot {
    flex-direction: column;
    align-items: center;
    gap: 5px;
    text-align: center;
  }

  .qr-toolbar {
    padding: 12px;
  }
}

@media (max-width: 380px) {
  .hero-action span {
    display: none;
  }

  .admin-header-actions .switch-label > span:first-child {
    display: none;
  }

  .hero-action {
    width: 37px;
    height: 40px;
  }

  .hero-title h1 {
    font-size: 21px;
  }

  .cart-cta {
    min-width: 76px;
    font-size: 13px;
  }

  .stats-grid {
    gap: 7px;
  }

  .stat-card strong {
    font-size: 21px;
  }

  .filter-bar .sound-btn {
    font-size: 11px;
  }
}

@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;
  }
}

@media print {
  body.qr-page {
    background: #fff;
  }

  .qr-toolbar,
  .toast {
    display: none !important;
  }

  .qr-sheet-wrap {
    padding: 0;
  }

  .qr-poster {
    width: 100%;
    max-width: none;
    border: 0;
    box-shadow: none;
    padding: 24mm 18mm;
  }

  .qr-canvas-frame canvas {
    width: 120mm;
    height: 120mm;
  }

  @page {
    size: A5;
    margin: 0;
  }
}
