:root {
  --ink: #4f302d;
  --muted: #a58a7d;
  --paper: #fff8ef;
  --paper-light: #fffdf9;
  --line: #f0dfd4;
  --rose: #f27888;
  --rose-deep: #cf566b;
  --wine: #704148;
  --peach: #ffd18a;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { width: 100%; margin: 0; min-height: 100%; overflow-x: hidden; background: #eadfd5; color: var(--ink); }
body { font-family: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
button, input, textarea { color: inherit; font: inherit; }
button { border: 0; cursor: pointer; }
button:focus-visible, textarea:focus-visible { outline: 3px solid rgba(242, 120, 136, .34); outline-offset: 2px; }

#app { width: 100%; max-width: 750px; min-height: 100dvh; margin: 0 auto; overflow-x: hidden; background: var(--paper); box-shadow: 0 0 70px rgba(73, 44, 37, .12); }
.screen { min-height: 100dvh; }

/* 首页：对应小程序全屏视频封面 */
.home-screen { position: relative; height: 100dvh; min-height: 620px; overflow: hidden; color: #fffaf2; background: #21100f; }
.home-media, .home-mask { position: absolute; inset: 0; width: 100%; height: 100%; }
.home-media { object-fit: cover; }
.home-mask { background: linear-gradient(180deg, rgba(20,9,7,.53), rgba(30,12,8,.06) 35%, rgba(27,9,7,.08) 61%, rgba(18,6,7,.72)); }
.home-grain { position: absolute; inset: 0; opacity: .12; pointer-events: none; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.35'/%3E%3C/svg%3E"); }
.home-brand { position: absolute; z-index: 2; top: calc(38px + env(safe-area-inset-top)); left: 28px; text-shadow: 0 3px 18px rgba(28,8,5,.5); }
.home-brand strong { display: block; font-family: Georgia, "STSong", serif; font-size: 36px; letter-spacing: 5px; }
.home-brand span { display: block; margin-top: 7px; color: rgba(255,241,222,.87); font-size: 12px; letter-spacing: 2px; }
.table-chip { position: absolute; z-index: 3; top: calc(40px + env(safe-area-inset-top)); right: 22px; display: flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid rgba(255,239,220,.42); border-radius: 999px; background: rgba(64,33,28,.24); color: #fff3e5; font-size: 12px; backdrop-filter: blur(10px); }
.table-chip i { width: 7px; height: 7px; border-radius: 50%; background: #a8d183; box-shadow: 0 0 0 4px rgba(168,209,131,.14); }
.home-copy { position: absolute; z-index: 2; top: 42%; left: 30px; transform: translateY(-50%); text-shadow: 0 3px 18px rgba(31,7,4,.44); }
.kicker { display: block; margin-bottom: 11px; color: rgba(255,225,190,.9); font-size: 10px; font-weight: 700; letter-spacing: 3px; }
.home-copy h1 { margin: 0; font-family: Georgia, "STSong", serif; font-size: clamp(35px, 9.5vw, 48px); line-height: 1.26; letter-spacing: 5px; }
.home-actions { position: absolute; z-index: 2; right: 22px; bottom: calc(42px + var(--safe-bottom)); left: 22px; }
.glass-action { position: relative; width: 100%; min-height: 82px; display: grid; grid-template-columns: 50px 1fr 22px; align-items: center; gap: 13px; padding: 14px 18px; overflow: hidden; border: 1px solid rgba(255,239,220,.48); border-radius: 24px; background: linear-gradient(135deg,rgba(238,211,184,.23),rgba(123,76,50,.17)); box-shadow: inset 0 1px rgba(255,255,255,.17), 0 12px 30px rgba(31,10,6,.18); color: #fffaf2; text-align: left; backdrop-filter: blur(12px) saturate(112%); }
.glass-action::before { content: ""; position: absolute; top: -55px; left: -30%; width: 90%; height: 120px; transform: rotate(-17deg); background: linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent); }
.glass-action:active { transform: scale(.985); }
.action-icon { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,227,190,.35); border-radius: 16px; }
.action-icon svg { width: 27px; height: 27px; stroke: #ffe0b6; }
.action-copy strong { display: block; font-family: Georgia, "STSong", serif; font-size: 19px; letter-spacing: 2px; }
.action-copy small { display: block; margin-top: 5px; color: rgba(255,237,218,.72); font-size: 11px; }
.action-arrow { font-family: Georgia, serif; font-size: 34px; font-weight: 300; }
.home-note { margin: 13px 4px 0; color: rgba(255,239,221,.72); font-size: 11px; text-align: center; }

/* 通用顶部栏与菜单 */
.menu-screen { height: 100dvh; display: flex; flex-direction: column; overflow: hidden; background: var(--paper); }
.topbar { height: calc(54px + env(safe-area-inset-top)); flex: none; display: grid; grid-template-columns: 70px 1fr 70px; align-items: end; padding: 0 14px 12px; background: rgba(255,250,244,.98); }
.topbar h1 { margin: 0; font-size: 17px; letter-spacing: 2px; text-align: center; }
.icon-button { width: 40px; height: 34px; display: grid; place-items: center; border-radius: 12px; background: transparent; font-size: 30px; line-height: 1; }
.topbar-table { justify-self: end; color: var(--rose-deep); font-size: 12px; font-weight: 700; }
.menu-banner { position: relative; height: 142px; flex: none; overflow: hidden; background: #6e3b3d; }
.menu-banner video { width: 100%; height: 100%; object-fit: cover; }
.banner-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(55,20,24,.91), rgba(86,35,42,.58) 46%, rgba(94,41,45,.12) 82%); }
.banner-copy { position: absolute; z-index: 2; top: 27px; left: 22px; color: #fffaf2; }
.banner-copy small { color: #ffd5b5; font-size: 9px; font-weight: 700; letter-spacing: 2px; }
.banner-copy strong { display: block; margin-top: 9px; font-family: Georgia, "STSong", serif; font-size: 23px; letter-spacing: 2px; }
.banner-copy span { display: block; margin-top: 8px; color: rgba(255,248,238,.86); font-size: 12px; letter-spacing: 1px; }
.banner-seal { position: absolute; z-index: 2; right: 19px; bottom: 15px; width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid rgba(255,239,222,.76); border-radius: 50%; background: rgba(84,35,40,.42); color: #fff3e4; font-family: "STSong", serif; font-size: 20px; }
.store-card { position: relative; z-index: 3; min-height: 64px; flex: none; display: flex; align-items: center; margin: -12px 15px 0; padding: 10px 12px; border: 1px solid rgba(255,255,255,.9); border-radius: 17px; background: rgba(255,253,249,.99); box-shadow: 0 8px 19px rgba(112,65,55,.12); }
.store-logo { width: 39px; height: 39px; flex: none; display: grid; place-items: center; border-radius: 12px; background: linear-gradient(145deg,#f78d9a,#ef687c); color: #fffaf0; font-family: "STSong", serif; font-size: 21px; font-weight: 700; }
.store-copy { min-width: 0; flex: 1; padding-left: 10px; }
.store-copy strong, .store-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-copy strong { font-size: 15px; }
.store-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; }
.dining-tag { display: flex; align-items: center; gap: 5px; padding: 6px 9px; border: 1px solid #f7b0ba; border-radius: 15px; color: #d25c70; font-size: 10px; font-weight: 700; }
.dining-tag i { width: 6px; height: 6px; border-radius: 50%; background: #87b76a; }
.menu-heading { height: 58px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 19px; }
.menu-heading strong, .menu-heading small { display: block; }
.menu-heading strong { font-family: Georgia, "STSong", serif; font-size: 18px; }
.menu-heading small { margin-top: 3px; color: #b0998d; font-size: 10px; }
.dish-count { padding: 5px 9px; border-radius: 15px; background: #ffe9df; color: #ce6875; font-size: 10px; }
.pot-selection-bar { flex: none; display: flex; align-items: center; gap: 10px; margin: 0 10px 8px; padding: 10px 11px; border: 1px solid #f4c4be; border-radius: 14px; background: #fff3ed; }
.pot-selection-bar div { min-width: 0; flex: 1; }
.pot-selection-bar strong,.pot-selection-bar span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pot-selection-bar strong { color: #74443e; font-size: 12px; }
.pot-selection-bar span { margin-top: 3px; color: #b07b70; font-size: 9px; }
.pot-selection-bar button { flex: none; padding: 9px 10px; border-radius: 11px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; }
.menu-layout { min-height: 0; flex: 1; display: grid; grid-template-columns: 86px 1fr; overflow: hidden; }
.category-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; background: #f8ecdf; }
.category-list::-webkit-scrollbar, .product-list::-webkit-scrollbar { display: none; }
.category-button { position: relative; width: 100%; min-height: 60px; padding: 9px 7px; background: transparent; color: #8d746b; font-size: 13px; line-height: 1.45; }
.category-button.active { border-radius: 0 18px 18px 0; background: #fffaf4; color: #d4566c; font-size: 14px; font-weight: 700; }
.category-button.active::before { content: ""; position: absolute; top: 18px; left: 0; width: 4px; height: 25px; border-radius: 0 5px 5px 0; background: var(--rose); }
.product-list { overflow-y: auto; overscroll-behavior: contain; padding-bottom: 98px; scroll-behavior: smooth; background: #fffaf4; }
.product-state { padding: 90px 18px; color: var(--muted); font-size: 13px; line-height: 1.7; text-align: center; }
.product-state button { display: block; margin: 12px auto 0; padding: 8px 13px; border-radius: 12px; background: #ffe9df; color: var(--rose-deep); }
.product-section { padding: 0 10px; scroll-margin-top: 0; }
.section-title { height: 38px; display: flex; align-items: center; justify-content: space-between; padding: 0 3px; }
.section-title strong { font-size: 14px; }
.section-title span { color: #c2a69a; font-size: 10px; }
.product-card { min-height: 124px; display: flex; gap: 10px; margin-bottom: 9px; padding: 8px; border: 1px solid rgba(238,221,208,.7); border-radius: 16px; background: #fff; box-shadow: 0 5px 14px rgba(118,74,60,.08); }
.product-photo { position: relative; width: 106px; height: 106px; flex: none; overflow: hidden; border-radius: 13px; background: linear-gradient(145deg,#ffe8e6,#ffcfd7); }
.product-photo img { width: 100%; height: 100%; object-fit: cover; }
.product-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: rgba(133,72,68,.5); font-family: "STSong", serif; font-size: 38px; }
.featured { position: absolute; top: 0; left: 0; padding: 4px 7px; border-radius: 0 0 8px 0; background: #e95868; color: #fff; font-size: 9px; font-weight: 700; }
.product-info { min-width: 0; flex: 1; display: flex; flex-direction: column; padding-top: 1px; }
.product-name { overflow: hidden; font-size: 15px; font-weight: 700; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.product-desc { overflow: hidden; margin-top: 3px; color: #9f877d; font-size: 10px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.tag-row { height: 21px; display: flex; gap: 4px; overflow: hidden; margin-top: 3px; }
.product-tag { flex: none; padding: 2px 5px; border-radius: 5px; background: #fff0eb; color: #dd7881; font-size: 8px; line-height: 15px; }
.product-footer { min-height: 34px; display: flex; align-items: flex-end; justify-content: space-between; margin-top: auto; }
.price { color: var(--rose-deep); font-size: 18px; font-weight: 800; }
.price small { margin-right: 1px; font-size: 11px; }
.add-button, .qty-button { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 50%; }
.add-button { background: linear-gradient(145deg,#ff95a4,#f05f79); box-shadow: 0 4px 9px rgba(222,82,107,.25); color: #fff; font-size: 23px; }
.quantity { display: flex; align-items: center; gap: 7px; padding: 2px; border: 1px solid #ffd5db; border-radius: 18px; background: #fff8f7; color: #a94d61; font-size: 12px; font-weight: 700; }
.qty-button { width: 28px; height: 28px; background: #ffe8eb; color: #d25b71; font-size: 19px; }
.qty-button.plus { background: var(--rose); color: #fff; }

.cart-dock { position: fixed; z-index: 20; right: max(calc((100vw - 750px) / 2 + 13px), 13px); bottom: calc(11px + var(--safe-bottom)); left: max(calc((100vw - 750px) / 2 + 13px), 13px); max-width: 724px; height: 68px; display: flex; align-items: center; padding: 7px 9px; border: 1px solid rgba(255,255,255,.78); border-radius: 21px; background: linear-gradient(105deg,#704148,#a85e63 52%,#ee858e); box-shadow: 0 9px 21px rgba(95,48,50,.27); color: #fff; }
.cart-dock.empty { background: linear-gradient(105deg,#a99a93,#c6b8b0); }
.cart-icon { position: relative; width: 48px; height: 48px; flex: none; display: grid; place-items: center; border-radius: 14px; background: rgba(63,31,36,.39); }
.cart-icon svg { width: 25px; height: 25px; stroke: #fff; }
.cart-badge { position: absolute; top: -5px; right: -5px; min-width: 19px; height: 19px; padding: 0 4px; border-radius: 12px; background: #fff0c9; color: #bd4c64; font-size: 10px; font-weight: 800; line-height: 19px; text-align: center; }
.cart-summary { min-width: 0; flex: 1; padding: 0 9px; }
.cart-summary strong, .cart-summary small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-summary strong { font-size: 15px; }
.cart-summary small { margin-top: 2px; color: #ffe5dd; font-size: 9px; }
.checkout-link { min-width: 80px; padding: 12px 10px; border-radius: 17px; background: linear-gradient(135deg,#ffd18a,#ff8994); color: #fff; font-size: 13px; font-weight: 800; }
.checkout-link:disabled { opacity: .48; }

/* 弹层与购物车 */
.modal-layer { position: fixed; z-index: 50; inset: 0; width: min(100%, 750px); margin: 0 auto; }
.modal-layer[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; width: 100%; background: rgba(54,32,31,.36); }
.seat-card, .cart-sheet { position: absolute; right: 14px; bottom: calc(14px + var(--safe-bottom)); left: 14px; border: 1px solid rgba(255,255,255,.86); border-radius: 25px; background: var(--paper-light); box-shadow: 0 18px 60px rgba(78,41,40,.28); animation: sheetUp .18s ease-out; }
.seat-card { padding: 10px 22px 24px; text-align: center; }
.sheet-handle { width: 48px; height: 5px; margin: 0 auto 14px; border-radius: 5px; background: #ead8ce; }
.mini-kicker { color: #c58b76; font-size: 10px; font-weight: 700; letter-spacing: 3px; }
.seat-card h2 { margin: 8px 0 5px; font-family: Georgia, "STSong", serif; font-size: 25px; }
.seat-card p { margin: 0; color: var(--muted); font-size: 13px; }
.guest-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 22px 0; }
.guest-option { height: 50px; border: 1px solid var(--line); border-radius: 15px; background: #fff9f4; color: #8d746b; }
.guest-option.active { border-color: var(--rose); background: #fff0ed; color: var(--rose-deep); font-weight: 800; }
.primary-button { width: 100%; min-height: 52px; border-radius: 18px; background: linear-gradient(115deg,#764349,#ef7d8a); color: #fff; font-weight: 800; letter-spacing: 1px; }
.cart-layer .modal-backdrop { padding: 0; }
.cart-sheet { bottom: calc(88px + var(--safe-bottom)); max-height: min(65dvh, 480px); overflow: hidden; padding-top: 9px; }
.sheet-header { display: flex; align-items: center; justify-content: space-between; padding: 5px 18px 13px; border-bottom: 1px solid #f4e8df; }
.sheet-header h2 { display: inline; margin: 0; font-size: 19px; }
.sheet-header span { margin-left: 8px; color: var(--muted); font-size: 11px; }
.text-button { background: transparent; color: var(--rose-deep); font-size: 12px; }
.cart-sheet-list { max-height: calc(min(65dvh, 480px) - 72px); overflow-y: auto; padding: 0 18px 11px; }
.cart-group h3 { position: sticky; top: 0; z-index: 1; margin: 0 -2px; padding: 11px 2px 7px; background: var(--paper-light); color: #b05d64; font-size: 12px; }
.cart-row { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid #f4e9e1; }
.cart-row-copy { min-width: 0; }
.cart-row-copy strong, .cart-row-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cart-row-copy strong { font-size: 14px; }
.cart-row-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; }
@keyframes sheetUp { from { opacity: 0; transform: translateY(22px); } }

/* 结算页 */
.checkout-screen { min-height: 100dvh; padding: calc(24px + env(safe-area-inset-top)) 18px calc(118px + var(--safe-bottom)); background: var(--paper); }
.checkout-heading { padding: 4px 5px 17px; }
.checkout-heading .mini-kicker { display: block; }
.checkout-heading h1 { margin: 7px 0 0; font-family: Georgia, "STSong", serif; font-size: 30px; }
.checkout-heading p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; margin-bottom: 17px; padding: 6px 0; background: transparent; color: #8f6257; font-size: 13px; }
.checkout-card { margin-bottom: 13px; padding: 17px; border: 1px solid #f3e4db; border-radius: 20px; background: var(--paper-light); box-shadow: 0 7px 20px rgba(111,70,46,.045); }
.checkout-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.checkout-card-head h2 { margin: 0; font-size: 17px; }
.checkout-card-head span { color: var(--muted); font-size: 12px; }
.seat-tag { padding: 5px 10px; border-radius: 9px; background: #fff0e8; color: #be7165 !important; font-size: 11px !important; }
.checkout-dish { display: flex; gap: 12px; padding: 12px 0; border-top: 1px solid #f3e4db; }
.checkout-group h3 { margin: 13px 0 0; padding: 8px 10px; border-radius: 9px; background: #fff0e9; color: #a85b5f; font-size: 12px; }
.checkout-dish-photo { width: 62px; height: 62px; flex: none; overflow: hidden; display: grid; place-items: center; border-radius: 13px; background: #fbe8d9; color: #ba8b70; font-family: serif; font-size: 25px; }
.checkout-dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.checkout-dish-copy { min-width: 0; flex: 1; }
.checkout-dish-copy strong { display: block; font-size: 14px; }
.checkout-dish-copy p { margin: 4px 0 8px; color: var(--muted); font-size: 11px; }
.checkout-dish-bottom { display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; }
.checkout-dish-bottom b { color: var(--ink); }
.receipt-total { display: flex; align-items: center; justify-content: space-between; margin-top: 5px; padding-top: 14px; border-top: 1px dashed #ead8cc; font-size: 14px; }
.receipt-total strong { color: var(--rose-deep); font-size: 20px; }
.remark { width: 100%; height: 92px; resize: none; padding: 13px; border: 0; border-radius: 12px; background: #fff8f2; font-size: 13px; line-height: 1.55; }
.hints { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.hint-button { padding: 7px 11px; border-radius: 9px; background: #fff1eb; color: #a46a5c; font-size: 11px; }
.payment-choice { display: flex; align-items: center; gap: 11px; padding: 13px; border: 1px solid #f3b8b4; border-radius: 14px; background: #fff5f1; }
.wechat-mark { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 12px; background: #e8f3e9; color: #589c69; font-size: 21px; font-weight: 800; }
.payment-copy { flex: 1; }
.payment-copy strong, .payment-copy span { display: block; }
.payment-copy strong { font-size: 14px; }
.payment-copy span { margin-top: 4px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.payment-status { padding: 5px 8px; border-radius: 8px; background: #fff0e8; color: #be7165; font-size: 10px; }
.payment-bar { position: fixed; z-index: 20; right: max(calc((100vw - 750px) / 2), 0px); bottom: 0; left: max(calc((100vw - 750px) / 2), 0px); max-width: 750px; display: flex; align-items: center; justify-content: space-between; padding: 13px 18px calc(13px + var(--safe-bottom)); border-top: 1px solid #f3e4db; background: var(--paper-light); box-shadow: 0 -7px 22px rgba(111,70,46,.06); }
.payment-total small, .payment-total strong { display: block; }
.payment-total small { color: var(--muted); font-size: 11px; }
.payment-total strong { margin-top: 2px; color: var(--rose-deep); font-size: 23px; }
.submit-order { min-width: 155px; min-height: 50px; padding: 0 18px; border-radius: 25px; background: var(--rose); color: #fff; font-weight: 800; }
.submit-order:disabled { background: #e5c3c5; }

.browser-guide-mask { position: fixed; z-index: 180; inset: 0; display: flex; align-items: flex-start; justify-content: center; padding: calc(70px + env(safe-area-inset-top)) 18px 24px; background: rgba(36,24,22,.7); backdrop-filter: blur(4px); }
.browser-guide { position: relative; width: min(100%, 430px); padding: 30px 24px 22px; border-radius: 26px; background: #fffaf5; box-shadow: 0 24px 70px rgba(39,19,17,.28); color: var(--ink); }
.guide-close { position: absolute; top: 12px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: #f6e9e1; color: #8e6d62; font-size: 24px; line-height: 1; }
.guide-eyebrow { color: #bf765f; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.browser-guide h2 { margin: 7px 0 8px; font: 700 26px Georgia,"Songti SC",serif; }
.browser-guide > p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.browser-guide ol { margin: 19px 0; padding: 15px 15px 15px 40px; border-radius: 16px; background: #fff0e8; color: #684840; font-size: 14px; line-height: 2; }
.guide-warning { margin-bottom: 16px; padding: 10px 12px; border-left: 3px solid var(--rose); background: #fff8f2; color: #9a645b; font-size: 11px; line-height: 1.55; }
.guide-later { display: block; margin: 13px auto 0; background: transparent; color: #9d7c70; font-size: 12px; }
.secondary-button { width: 100%; min-height: 48px; margin-top: 11px; border: 1px solid #e8cec3; border-radius: 18px; background: #fff8f2; color: #915d52; font-weight: 700; }
.pending-mark { background: #fff4d9; color: #c78a35; font-size: 24px; }
.payment-pending-card .primary-button:disabled { opacity: .55; }

.success-screen { min-height: 100dvh; display: grid; place-items: center; padding: 30px; background: radial-gradient(circle at 50% 15%, #fff7e9, #fff8ef 42%, #f7e7dd); text-align: center; }
.success-card { width: min(100%, 420px); padding: 38px 25px 29px; border: 1px solid #f1ded2; border-radius: 30px; background: rgba(255,253,249,.96); box-shadow: 0 20px 60px rgba(103,58,47,.11); }
.success-mark { width: 72px; height: 72px; display: grid; place-items: center; margin: 0 auto 18px; border-radius: 50%; background: #fff0eb; color: var(--rose); font-size: 34px; }
.success-card h1 { margin: 0; font-family: Georgia, "STSong", serif; font-size: 28px; }
.success-card p { color: var(--muted); font-size: 13px; line-height: 1.8; }
.order-number { margin: 20px 0; padding: 15px; border: 1px dashed #e9cfc1; border-radius: 14px; background: #fff8f2; }
.order-number small, .order-number strong { display: block; }
.order-number small { color: var(--muted); font-size: 11px; }
.order-number strong { margin-top: 5px; font-size: 16px; letter-spacing: .5px; }

.toast { position: fixed; z-index: 100; top: calc(22px + env(safe-area-inset-top)); left: 50%; max-width: min(82vw, 520px); padding: 11px 15px; border-radius: 13px; background: rgba(63,40,36,.93); color: #fff; font-size: 13px; line-height: 1.45; opacity: 0; transform: translate(-50%, -12px); pointer-events: none; transition: .2s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.spinner { width: 22px; height: 22px; margin: 0 auto 12px; border: 2px solid #f2d8cf; border-top-color: var(--rose); border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 桌码扫描器：像餐桌上方的一束聚光，只突出二维码识别区。 */
.scanner-layer { position: fixed; z-index: 130; inset: 0; display: flex; flex-direction: column; align-items: center; overflow: hidden; padding: calc(20px + env(safe-area-inset-top)) 20px calc(26px + env(safe-area-inset-bottom)); background: #1b1110; color: #fff8f1; }
.scanner-header { position: relative; z-index: 3; width: min(100%, 650px); display: grid; grid-template-columns: 44px 1fr 44px; align-items: center; text-align: center; }
.scanner-header button { width: 40px; height: 40px; border: 1px solid rgba(255,255,255,.2); border-radius: 50%; background: rgba(255,255,255,.09); color: #fff; font-size: 27px; line-height: 1; }
.scanner-header strong,.scanner-header span { display: block; }
.scanner-header strong { font: 700 20px Georgia,"Songti SC",serif; }
.scanner-header span { margin-top: 3px; color: rgba(255,248,241,.66); font-size: 11px; }
.scanner-stage { position: relative; width: min(78vw, 430px); aspect-ratio: 1; margin: clamp(38px,8vh,82px) auto 24px; overflow: hidden; border-radius: 28px; background: #090606; box-shadow: 0 24px 70px rgba(0,0,0,.42); }
#qr-reader { position: absolute; inset: 0; border: 0!important; }
#qr-reader video { width: 100%!important; height: 100%!important; object-fit: cover!important; border-radius: 28px; }
#qr-reader img,#qr-reader__dashboard_section,#qr-reader__header_message { display: none!important; }
.scanner-frame { position: absolute; z-index: 2; inset: 13%; pointer-events: none; }
.scanner-frame>i { position: absolute; width: 42px; height: 42px; border-color: #ffd6b4; border-style: solid; filter: drop-shadow(0 0 7px rgba(255,164,105,.4)); }
.scanner-frame>i:nth-child(1) { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 10px 0 0; }
.scanner-frame>i:nth-child(2) { top: 0; right: 0; border-width: 3px 3px 0 0; border-radius: 0 10px 0 0; }
.scanner-frame>i:nth-child(3) { bottom: 0; left: 0; border-width: 0 0 3px 3px; border-radius: 0 0 0 10px; }
.scanner-frame>i:nth-child(4) { right: 0; bottom: 0; border-width: 0 3px 3px 0; border-radius: 0 0 10px; }
.scanner-frame>span { position: absolute; left: 5%; right: 5%; top: 12%; height: 1px; background: linear-gradient(90deg,transparent,#ffb481 20%,#fff2df 50%,#ffb481 80%,transparent); box-shadow: 0 0 9px #ff9e69; animation: scan-line 2.2s ease-in-out infinite alternate; }
.scanner-status { min-height: 22px; margin: 0; color: #f8dfcf; font-size: 13px; text-align: center; }
.scanner-privacy { margin-top: auto; color: rgba(255,248,241,.48); font-size: 10px; text-align: center; }
@keyframes scan-line { to { top: 87%; } }

@media (min-width: 751px) {
  body { padding: 18px 0; }
  #app { min-height: calc(100dvh - 36px); border-radius: 26px; overflow: hidden; }
  .screen, .menu-screen, .home-screen { min-height: calc(100dvh - 36px); height: calc(100dvh - 36px); }
  .cart-dock { bottom: 29px; }
  .modal-layer { inset: 18px 0; height: calc(100dvh - 36px); border-radius: 26px; overflow: hidden; }
  .scanner-layer { left: 50%; width: min(750px,100%); transform: translateX(-50%); }
  .payment-bar { bottom: 18px; }
}

@media (max-width: 380px) {
  .menu-layout { grid-template-columns: 78px 1fr; }
  .product-photo { width: 88px; height: 96px; }
  .product-card { min-height: 112px; }
  .product-desc { max-width: 150px; }
}

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