{"config":{"pages":["pages/index/index","pages/menu/menu","pages/dish/dish","pages/cart/cart","pages/order-confirm/order-confirm","pages/orders/orders","pages/order-detail/order-detail","pages/reserve/reserve","pages/reservations/reservations","pages/mine/mine"],"window":{"navigationBarTitleText":"牧心纪云雾餐厅","navigationBarBackgroundColor":"#31483C","navigationBarTextStyle":"white","backgroundColor":"#F7F6EF","backgroundTextStyle":"light"},"tabBar":{"color":"#626B5A","selectedColor":"#31483C","backgroundColor":"#FFFEF8","borderStyle":"white","list":[{"pagePath":"pages/index/index","text":"首页","iconPath":"images/tabbar/home.png","selectedIconPath":"images/tabbar/home-selected.png"},{"pagePath":"pages/menu/menu","text":"点餐","iconPath":"images/tabbar/menu.png","selectedIconPath":"images/tabbar/menu-selected.png"},{"pagePath":"pages/orders/orders","text":"订单","iconPath":"images/tabbar/orders.png","selectedIconPath":"images/tabbar/orders-selected.png"},{"pagePath":"pages/mine/mine","text":"我的","iconPath":"images/tabbar/mine.png","selectedIconPath":"images/tabbar/mine-selected.png"}]},"style":"v2","lazyCodeLoading":"requiredComponents","sitemapLocation":"sitemap.json"},"modules":{"/app.js":"var backendConfig = require('./config/backend-config.js');\nvar live = require('./utils/live.js');\nvar bookingRules = require('./config/booking-rules.js');\nvar canOrderForReservation = require('./utils/reservation-orders.js').canOrderForReservation;\n\nApp({\n  globalData: {\n    backendUrl: backendConfig.baseUrl,\n    room: '',\n    reservationOrder: null,\n    guestType: '', // 'room' 客房住客 | 'hall' 大厅用餐 | 'walkin' 散客\n    deliveryType: 'room' // 'room' 客房送餐 | 'hall' 大厅用餐\n  },\n  onLaunch(options) {\n    if (wx.onNetworkStatusChange) wx.onNetworkStatusChange(result => live.networkChanged(result.isConnected));\n    try { wx.removeStorageSync('yunwu_room'); } catch (error) {}\n    this.bindScannedEntry(options);\n  },\n  onShow(options) { this.bindScannedEntry(options); live.resume(); },\n  onHide() { live.pause(); this.clearRoom(); },\n  bindScannedEntry(options) {\n    if (!options || ![1011, 1047].includes(options.scene) || !options.query) return;\n    var query = options.query;\n    var room = this.parseRoom(query.scene) || this.parseRoom(query.q) || bookingRules.normalizeRoom(query.room);\n    if (room) this.globalData.room = room;\n  },\n  clearRoom() { this.globalData.room = ''; },\n  startReservationOrder(booking) {\n    if (!canOrderForReservation(booking)) {\n      wx.showToast({ title: '这笔预约当前无法点餐', icon: 'none' });\n      return;\n    }\n    var { id, date, slot, name, phone, roomName } = booking;\n    this.globalData.reservationOrder = { id: id, date: date, slot: slot, name: name, phone: phone, roomName: roomName };\n    this.globalData.guestType = 'walkin';\n    this.globalData.deliveryType = 'hall';\n    wx.switchTab({ url: '/pages/menu/menu' });\n  },\n  scanRoom(onResult) {\n    if (this.scanningRoom) return;\n    this.scanningRoom = true;\n    var finish = () => {\n      this.scanningRoom = false;\n      onResult(this.globalData.room);\n    };\n    wx.scanCode({\n      scanType: ['qrCode', 'wxCode'],\n      onlyFromCamera: true,\n      success: (scan) => {\n        var room = this.parseRoom(scan.result) || this.parseRoom(scan.path);\n        if (room) {\n          this.globalData.room = room;\n          wx.showToast({ title: '房号 ' + room, icon: 'success' });\n        } else {\n          wx.showToast({ title: '请扫有效的房间二维码', icon: 'none' });\n        }\n        finish();\n      },\n      fail: (error) => {\n        if (!/cancel/i.test(error.errMsg || '')) wx.showToast({ title: '扫码失败，请重试', icon: 'none' });\n        finish();\n      }\n    });\n  },\n  parseRoom(value) {\n    if (typeof value !== 'string') return '';\n    var payload;\n    try {\n      payload = decodeURIComponent(value.trim());\n      var scene = /(?:^|[?&])scene=([^&#]+)/.exec(payload);\n      if (scene) payload = decodeURIComponent(scene[1]);\n    } catch (error) { return ''; }\n    var match = /(?:^|[?&])room=([^&#]+)/.exec(payload);\n    return bookingRules.normalizeRoom(match ? match[1] : payload);\n  }\n});\n","/config/backend-config.js":"module.exports = { baseUrl: 'https://anytest.ccwu.cc' };\n","/config/booking-rules.js":"var singleFloorRooms = ['101', '102', '103'];\r\nvar sharedRooms = ['101', '102', '201', '202', '203', '205'];\r\nvar roomNumbers = {\r\n  A: ['101', '102', '201', '202', '301', '302', '501', '502', '601', '602', '701', '702', '801', '802', '901', '902'],\r\n  B: singleFloorRooms,\r\n  C: singleFloorRooms,\r\n  H: sharedRooms,\r\n  J: sharedRooms\r\n};\r\n\r\nfunction normalizeRoom(value) {\r\n  if (typeof value !== 'string') return '';\r\n  var room = value.trim().toUpperCase();\r\n  var match = /^([ABCHJ])(\\d{3,4})$/.exec(room);\r\n  return match && roomNumbers[match[1]].indexOf(match[2]) !== -1 ? room : '';\r\n}\r\n\r\nfunction minPartySize(type) {\r\n  return type === 'private' ? 10 : 1;\r\n}\r\n\r\nvar slots = ['11:00', '11:30', '12:00', '12:30', '17:00', '17:30', '18:00', '18:30', '19:00'];\r\nvar hallCapacity = require('./hall-capacity.js');\r\nvar hall = hallCapacity.limits;\r\nfunction maxPartySizeFor(type) { return type === 'hall' ? hall.maxPartySize : 30; }\r\nfunction mealForSlot(slot) { return slot < '15:00' ? 'lunch' : 'dinner'; }\r\nvar meetingMinimum = 20;\r\nvar meetingMaximum = 30;\r\nfunction roomMinimum(room) { return room.id === 'meeting' ? meetingMinimum : minPartySize('private'); }\r\nfunction roomMaximum(room) { return room.id === 'meeting' ? meetingMaximum : meetingMinimum - 1; }\r\nfunction roomSizeHint(room, size) {\r\n  if (room.id !== 'meeting' && size >= meetingMinimum && size <= meetingMaximum) return '仅可订会议室';\r\n  if (size < roomMinimum(room)) return roomMinimum(room) + ' 人起订';\r\n  return size > Math.min(roomMaximum(room), room.capacity) ? '人数超出容量' : '';\r\n}\r\nfunction restaurantTime(now) {\r\n  return new Date((now || new Date()).getTime() + 8 * 60 * 60 * 1000).toISOString().slice(0, 16);\r\n}\r\n\r\nfunction isPastSlot(date, slot, now) {\r\n  return !!date && !!slot && date + 'T' + slot <= restaurantTime(now);\r\n}\r\n\r\nvar privateRooms = [\r\n  { id: 'meditation', name: '禅修室', recommendFrom: 10, capacity: 12, slots: slots },\r\n  { id: 'yunjing', name: '云经包厢', recommendFrom: 15, capacity: meetingMinimum - 1, slots: slots },\r\n  { id: 'meeting', name: '会议室', recommendFrom: meetingMinimum, capacity: meetingMaximum, slots: slots }\r\n];\r\n\r\nmodule.exports = {\r\n  normalizeRoom: normalizeRoom, minPartySize: minPartySize, maxPartySize: 30,\r\n  maxPartySizeFor: maxPartySizeFor, hall: hall, hallCapacity: hallCapacity, mealForSlot: mealForSlot, roomMinimum: roomMinimum,\r\n  roomMaximum: roomMaximum, roomSizeHint: roomSizeHint,\r\n  slots: slots, privateRooms: privateRooms, restaurantTime: restaurantTime, isPastSlot: isPastSlot\r\n};\r\n","/config/hall-capacity.js":"const limits = { tables: 8, regularSeats: 6, largeTables: 2, maxPartySize: 8 };\n\nfunction usage(booked, seated) {\n  const biggestBooking = new Map();\n  let total = booked.length;\n  let large = 0;\n  for (const { owner, size } of booked) {\n    biggestBooking.set(owner, Math.max(biggestBooking.get(owner) || 0, size || 0));\n    if (size > limits.regularSeats) large++;\n  }\n  // A guest adding dishes uses one of their existing tables for this meal.\n  for (const { owner, size } of seated) {\n    if (!biggestBooking.has(owner)) total++;\n    if (size > limits.regularSeats && (biggestBooking.get(owner) || 0) <= limits.regularSeats) large++;\n  }\n  return { total, large };\n}\n\nfunction availability(booked, seated, { owner, partySize = 1, visit = false, confirmedId } = {}) {\n  const used = usage(booked, seated);\n  if (visit) {\n    const previous = seated.find(row => row.owner === owner);\n    seated = seated.filter(row => row.owner !== owner);\n    seated.push({ owner, size: Math.max(previous ? previous.size : 0, partySize) });\n  } else if (!confirmedId || !booked.some(row => row.id === confirmedId)) {\n    booked = booked.concat({ owner, size: partySize });\n  }\n  const next = usage(booked, seated);\n  const remaining = Math.max(0, limits.tables - used.total);\n  const largeRemaining = Math.max(0, Math.min(remaining, limits.largeTables - used.large));\n  let code = '';\n  if (next.total > limits.tables && next.total > used.total) code = 'hall_full';\n  else if (next.large > limits.largeTables && next.large > used.large) code = 'hall_large_full';\n  return { ...limits, remaining, largeRemaining, available: !code, code };\n}\n\nfunction message(code) {\n  return code === 'hall_large_full' ? '本餐段大厅的两张 7–8 人桌已满，请选择其他餐段。' : '大厅桌位已满，请选择其他时段或包间用餐。';\n}\n\nmodule.exports = { limits, availability, message };\n","/config/pay-config.js":"// 微信支付配置占位：商户号未配置，支付流程待用户后续补充。\n// 硬规则：此处绝不放商户密钥、API 密钥、证书或签名；签名只由可信服务端生成。\n// wx.requestPayment 只能在服务端下单并返回真实参数后调用；本版不调用它。\nmodule.exports = {\n  configured: false,\n  merchantId: '',\n  note: '微信支付待联调：商户号未配置'\n};\n","/data/dish-preparations.js":"module.exports = {\n  d001: { name: '黄焖溪石斑鱼', confirmed: false,\n    ingredients: '溪石斑鱼、姜、蒜、葱、料酒、生抽',\n    steps: [\n      '鱼处理干净后擦去表面水分，鱼身较厚处划刀，用少许盐和料酒稍作腌制。',\n      '锅中先煎鱼，待两面定形、边缘微黄后，加入姜蒜和葱白炒香。',\n      '加热水与生抽，中火加盖焖至鱼肉熟透。开盖把汤汁略收浓，舀回鱼身，撒葱段出锅。'\n    ]\n  },\n  d002: { name: '煎焖洋尖', confirmed: false,\n    ingredients: '洋尖鱼、姜片、葱段、料酒、生抽',\n    steps: [\n      '把处理好的鱼沥干，鱼身抹少许盐；姜片和葱段分开放，葱绿留到最后。',\n      '热锅薄油，把鱼两面煎至浅金黄；沿锅边淋料酒，再加入姜和葱白。',\n      '添水盖焖至鱼熟，不频繁翻动鱼身。出锅前淋生抽，留少量汤汁，撒葱绿。'\n    ]\n  },\n  d003: { name: '翘嘴两吃', confirmed: false,\n    ingredients: '翘嘴鱼、葱姜；两种做法的配料分别准备',\n    note: '以下用清蒸、红烧作占位，两吃的实际搭配待核对。',\n    steps: [\n      '把处理好的翘嘴按两种做法分切，蒸制用的鱼段保留完整，烧制用的切成大小相近的块。',\n      '清蒸部分用葱姜垫盘，水开后上锅蒸熟，端出后淋少许蒸鱼豉油。',\n      '红烧部分先煎定形，再加葱姜和生抽焖熟，收汁后另装一盘。'\n    ]\n  },\n  d004: { name: '红烧鳊鱼', confirmed: false,\n    ingredients: '鳊鱼、葱姜蒜、生抽、老抽、少量糖',\n    steps: [\n      '鳊鱼沥干，在两侧划浅刀；将葱段、姜片和拍蒜备好。',\n      '鱼两面煎至定形后下葱姜蒜，兑入生抽、少量老抽、糖和热水。',\n      '用勺把烧汁舀到鱼身上，焖熟后开盖收汁，保留一点汁水随鱼上桌。'\n    ]\n  },\n  d005: { name: '酸菜炒石鱼', confirmed: false,\n    ingredients: '石鱼、酸菜、姜丝、蒜末、辣椒',\n    note: '鱼的规格和配菜以核对后的厨房做法为准。',\n    steps: [\n      '鱼处理后切适口块并沥干；酸菜先尝咸淡，必要时冲洗、挤干再切碎。',\n      '姜蒜下锅炒香，入鱼块煎至定形；另一侧炒香酸菜和辣椒，再与鱼块合炒。',\n      '沿锅边加一点热水，翻炒至鱼肉完全熟透。让酸菜裹住鱼块，再按咸淡补味。'\n    ]\n  },\n  d006: { name: '红烧洋全全鱼', confirmed: false,\n    ingredients: '鱼、姜、蒜、葱、生抽、料酒',\n    note: '鱼名与品种待核对，这里先用通用红烧鱼做法占位。',\n    steps: [\n      '鱼处理后擦干水分，按大小决定用整鱼还是切段。',\n      '鱼下锅煎至表面定形，加入葱姜蒜炒香，淋料酒和生抽，加热水烧开。',\n      '转中火焖至鱼熟透，轻轻晃锅避免粘底。开盖收至汤汁能挂在鱼身即可。'\n    ]\n  },\n  d007: { name: '清蒸鳊鱼', confirmed: false,\n    ingredients: '鳊鱼、姜片、葱丝、蒸鱼豉油',\n    steps: [\n      '鳊鱼处理干净，以姜片和葱段垫起鱼身；另外切葱丝留作出锅用。',\n      '蒸锅水沸后放鱼，大火蒸至厚处也熟透；取出后倒掉盘内多余的蒸汁。',\n      '换上新鲜葱丝，沿鱼身淋蒸鱼豉油，可用少量热油激出葱香。'\n    ]\n  },\n  d008: { name: '小炒烧牛肉', confirmed: false,\n    ingredients: '牛肉、青红椒、姜、蒜、生抽、淀粉',\n    steps: [\n      '牛肉逆纹切薄片，抓入生抽、少量水和淀粉，拌匀后拌一点油。青红椒切段。',\n      '热锅把牛肉迅速拨散，炒至表面变色后先盛出；原锅炒香姜蒜与辣椒。',\n      '将牛肉回锅，与辣椒快速翻匀并炒至熟透。调味收干余汁，保留小炒的锅气。'\n    ]\n  },\n  d009: { name: '红葱煎炒走地鸡', confirmed: false,\n    ingredients: '走地鸡、红葱头、姜、料酒、生抽',\n    steps: [\n      '鸡切大小相近的块，沥去多余水分后拌少许生抽和料酒；红葱头去皮切瓣。',\n      '先用热油煎鸡块，鸡皮一面煎出焦香后翻动；放姜片和一半红葱头炒香。',\n      '加少量热水盖焖至鸡肉熟透。开盖收汁，下余下的红葱头翻炒至香气出来。'\n    ]\n  },\n  d010: { name: '椒盐羊排', confirmed: false,\n    ingredients: '羊排、葱姜、椒盐、蒜末',\n    steps: [\n      '羊排沿骨分切，擦干后用葱姜和少许盐略腌，使各块大小尽量接近。',\n      '将羊排先煎定形，转中火煎烤至熟，再把外层煎到微焦；静置后装盘。',\n      '另锅用少油炒香蒜末，羊排回锅撒椒盐翻匀，趁外层仍酥香时上桌。'\n    ]\n  },\n  d011: { name: '糖醋咕噜肉', confirmed: false,\n    ingredients: '猪肉、淀粉、糖、醋、番茄酱；彩椒可作配菜',\n    steps: [\n      '猪肉切成均匀小块，略调底味，裹薄薄一层淀粉浆。',\n      '分批把肉块炸熟，捞出沥油；再短暂复炸，让外壳更酥。用糖、醋和番茄酱煮成糖醋汁。',\n      '肉块下锅快速翻裹糖醋汁，配菜一并拌匀；酱汁刚能挂住时即装盘。'\n    ]\n  },\n  d012: { name: '藕带炒牛肉', confirmed: false,\n    ingredients: '藕带、牛肉、姜蒜、辣椒、生抽、淀粉',\n    steps: [\n      '藕带斜切成段并沥干；牛肉逆纹切片，用生抽和薄淀粉浆抓匀。',\n      '牛肉先滑炒至变色并盛出。锅中补少量油，把姜蒜、辣椒和藕带炒出香气。',\n      '合入牛肉翻炒到熟透。若用的是酸藕带，先尝咸酸再调味，避免把藕带炒软。'\n    ]\n  },\n  d013: { name: '农家炒笋片', confirmed: false,\n    ingredients: '处理好的食用笋、蒜片、青椒、盐',\n    steps: [\n      '将笋切薄片，充分煮熟后捞出沥水，避免带太多水下锅。',\n      '热油炒香蒜片与青椒，加入笋片大火翻炒，让笋片均匀受热。',\n      '用少量盐调味，锅内水汽收干即可装盘，突出笋片的清鲜和脆嫩。'\n    ]\n  },\n  d014: { name: '宽苹菇炒五花肉', confirmed: false,\n    ingredients: '五花肉、食用菇、蒜片、葱段、生抽',\n    note: '菇名待核对，用料表先写食用菇，不对应具体品种。',\n    steps: [\n      '按菇的品种完成清理和前处理，切成适口块；五花肉切片。',\n      '五花肉用中火煸出油，待肉片边缘微卷后下蒜；放入处理好的菇翻炒。',\n      '炒至菇和肉都熟透，等菇汁略收后淋少许生抽，下葱段翻匀。'\n    ]\n  },\n  d015: { name: '油渣炒尖椒', confirmed: false,\n    ingredients: '猪油渣、尖椒、蒜片、生抽',\n    steps: [\n      '尖椒去蒂切段，晾去水分；油渣按大小改成方便入口的块。',\n      '锅内少油，大火煸炒尖椒至边缘略起斑，加入蒜片炒香。',\n      '油渣最后下锅回炒至热透，淋少量生抽，翻匀立即出锅以保留酥感。'\n    ]\n  },\n  d016: { name: '毛豆肉丁', confirmed: false,\n    ingredients: '毛豆仁、猪肉丁、蒜、淀粉、生抽',\n    steps: [\n      '毛豆仁先煮熟并沥干。猪肉切成和毛豆差不多大的丁，拌少量生抽与淀粉。',\n      '锅中炒散肉丁至变色，加入蒜末，再倒入毛豆仁一起翻炒。',\n      '加一点热水让肉丁炒至熟透；大火收干余汁，使毛豆和肉丁均匀裹味。'\n    ]\n  },\n  d017: { name: '农家烧豆腐', confirmed: false,\n    ingredients: '豆腐、葱蒜、生抽、少量淀粉',\n    steps: [\n      '豆腐切厚片或大块，沥干后平铺入锅，两面煎到浅金色。',\n      '炒香葱蒜，加入生抽和少量水，豆腐回锅后用中小火烧入味。',\n      '少量水淀粉收汁；收汁时用晃锅或推动代替用力翻炒，避免豆腐碎掉。'\n    ]\n  },\n  d018: { name: '松子玉米', confirmed: false,\n    ingredients: '甜玉米粒、松子仁、少量盐',\n    steps: [\n      '玉米粒煮熟后沥水。松子仁单独用小火焙到浅金色，再摊开。',\n      '用少量油快炒玉米粒，调少许盐；如需挂一点清汁，可用薄芡收匀。',\n      '把焙香的松子留到起锅前拌入，减少与湿热酱汁接触的时间。'\n    ]\n  },\n  d019: { name: '西红柿炒鸡蛋', confirmed: false,\n    ingredients: '西红柿、鸡蛋、葱花、盐',\n    steps: [\n      '西红柿切块，鸡蛋加少量盐打散；葱花留一半出锅时用。',\n      '蛋液入热锅炒成大块并盛出，再炒西红柿至边缘软化、锅底出汁。',\n      '鸡蛋回锅吸收番茄汁，翻匀炒熟后加葱花，保留少量汁水装盘。'\n    ]\n  },\n  d020: { name: '银鱼水蒸蛋', confirmed: false,\n    ingredients: '银鱼、鸡蛋、温水、葱花、生抽',\n    steps: [\n      '银鱼按鲜品或干品分别清理，干品先泡发并沥干。蛋液与温水搅匀后过筛。',\n      '碗里放银鱼和蛋液，盖盘防止滴水，上汽后用中小火蒸至蛋液中心凝固、银鱼熟透。',\n      '蒸好后揭盖，沿碗边淋少许生抽，撒葱花。'\n    ]\n  },\n  d021: { name: '水蒸蛋', confirmed: false,\n    ingredients: '鸡蛋、温水、盐；葱花可作点缀',\n    steps: [\n      '鸡蛋加少量盐打散，加入约一到一点五倍的温水，拌匀后过筛去泡沫。',\n      '蛋液倒入浅碗，盖盘或蒸盖防滴水，水开后用中小火蒸。',\n      '蛋羹中心凝固后端出，按口味点少量生抽或葱花。'\n    ]\n  },\n  d022: { name: '土豆丝(清炒/酸辣)', confirmed: false,\n    ingredients: '土豆、蒜；酸辣口另加干辣椒和醋',\n    steps: [\n      '土豆去皮切匀丝，用清水漂去表面淀粉，再沥干。',\n      '清炒版用蒜爆香后快炒，以盐提味；酸辣版先爆香干辣椒，再下土豆丝翻炒。',\n      '两种都炒至熟而爽脆。酸辣版出锅前沿锅边淋醋，翻匀后即盛。'\n    ]\n  },\n  d023: { name: '辣椒炒肉', confirmed: false,\n    ingredients: '猪肉、鲜辣椒、蒜、生抽',\n    steps: [\n      '猪肉分出肥瘦切片，瘦肉略拌生抽；辣椒切段后沥干。',\n      '肥肉先煸出油，再炒辣椒到表皮略起皱，加入蒜片和瘦肉翻炒。',\n      '确认肉片炒熟后调味，拌到肉片和辣椒都挂上薄薄一层锅汁。'\n    ]\n  },\n  d024: { name: '干煸豆角', confirmed: false,\n    ingredients: '豆角、蒜、干辣椒；肉末可作配料',\n    steps: [\n      '豆角掐头去筋、切成等长段，先充分煮熟，再沥干表面水分。',\n      '用油煸到豆角表面起皱。另下蒜末和干辣椒炒香；若加肉末，先把肉末炒熟。',\n      '豆角回锅与调料煸匀，炒干余汁，出锅前再尝咸淡。'\n    ]\n  },\n  d025: { name: '鱼香茄子', confirmed: false,\n    ingredients: '茄子、蒜姜、豆瓣酱、糖、醋、淀粉',\n    steps: [\n      '茄子切长条，略蒸软或先煎软；用糖、醋、生抽和少量淀粉调成鱼香汁。',\n      '锅中炒香姜蒜与豆瓣酱，放茄子拌匀，使茄条吸收底味。',\n      '倒入鱼香汁烧到茄子完全熟软、酱汁挂在表面，最后撒葱花。'\n    ]\n  },\n  d026: { name: '苦瓜炒鸡蛋', confirmed: false,\n    ingredients: '苦瓜、鸡蛋、蒜、盐',\n    steps: [\n      '苦瓜对半剖开，刮净白瓤后切薄片，短暂焯水再沥干；鸡蛋打散。',\n      '蛋液滑炒成块后先盛出，锅中炒香蒜末，再炒苦瓜至熟。',\n      '把鸡蛋回锅合炒，少量盐调味，翻匀后盛出。'\n    ]\n  },\n  d027: { name: '时蔬', confirmed: false,\n    ingredients: '当日供应的蔬菜、蒜、盐',\n    steps: [\n      '按当天用菜摘洗、沥水，叶片与较厚的菜梗分开备好。',\n      '热锅爆香蒜，先放菜梗或较厚部分，再把叶片下锅大火翻炒。',\n      '炒至菜熟、颜色仍鲜亮时少量加盐，避免提前下盐煮出过多水。'\n    ]\n  },\n  d028: { name: '银鱼鸡蛋汤', confirmed: false,\n    ingredients: '银鱼、鸡蛋、姜丝、葱花',\n    steps: [\n      '银鱼清理后沥水，干银鱼先泡发；鸡蛋打散，另备姜丝。',\n      '水加姜丝煮出香气，下银鱼煮熟。把汤保持在微沸状态，蛋液分次细淋。',\n      '蛋花形成并熟透后关火，调盐，撒葱花，尽量不再反复搅动。'\n    ]\n  },\n  d029: { name: '苦瓜排骨肉片汤', confirmed: false,\n    ingredients: '苦瓜、排骨、猪肉片、姜片',\n    note: '排骨与肉片是否同时使用，待核对厨房出品。',\n    steps: [\n      '排骨焯水后洗去浮沫，用姜片和清水小火煮成汤底。苦瓜去瓤切块，瘦肉切薄片。',\n      '排骨煮至熟软后放苦瓜，煮到苦瓜熟而不散。',\n      '出锅前下肉片拨散煮熟，撇去浮沫，最后用少量盐调味。'\n    ]\n  },\n  d030: { name: '一鱼两吃', confirmed: false,\n    ingredients: '鱼、葱姜；剁椒与蒸鱼调味料为占位配料',\n    note: '原菜单括号内做法待核对，暂以剁椒和清蒸演示，并非已确认搭配。',\n    steps: [\n      '按鱼的大小分成两份，分别铺在盘中，葱姜底料分开准备。',\n      '一份铺剁椒，上汽后蒸至鱼肉熟透，出锅把盘汁淋在鱼上。',\n      '另一份用葱姜清蒸至熟，出锅另淋蒸鱼豉油；两种口味分盘摆放。'\n    ]\n  },\n  d031: { name: '苦瓜皮蛋汤', confirmed: false,\n    ingredients: '苦瓜、皮蛋、姜片、盐',\n    steps: [\n      '苦瓜刮除白瓤后切薄片；皮蛋去壳切成小块，姜切细片。',\n      '清水煮开后下姜和苦瓜，待苦瓜煮熟，再下皮蛋短煮。',\n      '汤重新沸腾后转小火片刻，按咸淡调味，起锅时尽量不把皮蛋搅碎。'\n    ]\n  },\n  d032: { name: '香辣小龙虾', confirmed: false,\n    ingredients: '小龙虾、干辣椒、姜蒜、香辛料、豆瓣酱',\n    steps: [\n      '逐只清理合格的小龙虾，沥去水分，生熟用具分开。',\n      '姜蒜、辣椒和豆瓣酱用油炒出香味，下小龙虾翻炒，加入适量水和香辛料。',\n      '加盖煮至全熟，开盖收至汤汁浓而不干，翻匀让每只虾都裹上香辣汁。'\n    ]\n  },\n  d033: { name: '蒜蓉小龙虾', confirmed: false,\n    ingredients: '小龙虾、蒜蓉、姜、葱、少量糖',\n    steps: [\n      '把小龙虾逐只清理干净并沥水；蒜切成蓉，分成两份。',\n      '先炒香姜和一份蒜蓉，再下小龙虾翻炒，添水盖锅煮至全熟。',\n      '加剩余蒜蓉再煮片刻，略收汤汁，调咸淡后撒葱。'\n    ]\n  },\n  d034: { name: '小龙虾2份', confirmed: false, serving: true,\n    note: '套餐是否可任选两种口味，待餐厅确认。',\n    steps: [\n      '按两份小龙虾准备；每份口味以餐厅实际可选项为准。',\n      '参照对应单品的做法分锅调味、煮熟，分盘或分盒供应。'\n    ]\n  },\n  d035: { name: '酸梅汤', confirmed: false,\n    ingredients: '乌梅、山楂、陈皮、冰糖',\n    steps: [\n      '乌梅、山楂和陈皮洗净，按配方用清水浸润后入锅。',\n      '煮沸后改小火，让果料释放酸香；滤出果料，再用冰糖调节酸甜。',\n      '放凉后冷藏，供应时搅匀；是否加冰可另行确认。'\n    ]\n  },\n  d036: { name: '百香果饮', confirmed: false,\n    ingredients: '百香果果肉、饮用水、糖浆',\n    steps: [\n      '百香果洗净外壳，切开取果肉，是否滤去果籽按出品要求处理。',\n      '果肉用饮用水调开，分次加糖浆，边搅边尝到酸甜平衡。',\n      '倒杯前再轻搅一次，使果肉分布均匀。'\n    ]\n  },\n  d037: { name: '金瓜米乳(热饮)', confirmed: false,\n    ingredients: '金瓜、大米、饮用水',\n    steps: [\n      '金瓜去皮去籽切块；大米淘洗后加水煮熟，瓜块另蒸软或与米同煮。',\n      '把熟金瓜和米加适量热水打细，按想要的浓稠度分次补水。',\n      '米乳回锅加热，边搅边热防止粘底，趁温热供应。'\n    ]\n  },\n  d038: { name: '五谷米乳(热饮)', confirmed: false,\n    ingredients: '大米和配方杂粮；杂粮组合待核对',\n    steps: [\n      '谷物按品种分别淘洗，较硬的杂粮提前浸泡，再一起煮至熟软。',\n      '用适量热水把熟谷物搅打细腻，尝浓稠度后再补水。',\n      '回锅搅拌加热，避免沉底焦糊，趁温热装杯。'\n    ]\n  },\n  d039: { name: '手工水饺', confirmed: false,\n    ingredients: '面粉、水、当日供应的饺子馅',\n    note: '馅料口味待确认，不预设固定肉馅。',\n    steps: [\n      '面粉加水揉成柔韧面团，醒面后搓条、分剂，擀成中间略厚的圆皮。',\n      '放入当日备好的馅料，捏紧封口，饺子之间留空摆放。',\n      '水开后下饺子并轻推防粘，煮至饺皮与馅心都熟透，再捞出沥水。'\n    ]\n  },\n  d040: { name: '炒饭(蛋/肉)', confirmed: false,\n    ingredients: '米饭、葱花；蛋炒用鸡蛋，肉炒用肉丁',\n    steps: [\n      '将米饭拨散。蛋炒版打散鸡蛋；肉炒版将肉切丁，先炒熟。',\n      '蛋炒版把鸡蛋炒成细碎蛋花再下米饭；肉炒版把米饭与炒熟的肉丁合炒。',\n      '大火翻炒至米粒松散热透，盐或生抽调味，最后撒葱花。'\n    ]\n  },\n  d041: { name: '开花馒头', confirmed: false,\n    ingredients: '面粉、水、酵母、糖',\n    steps: [\n      '面粉、水、酵母和糖揉成团，盖好醒发至面团蓬松。',\n      '分剂成形，让顶部留自然接缝，再短时醒发，装入留有间距的蒸格。',\n      '水沸后上锅蒸透，馒头顶部展开后关火；揭盖前稍等，减少表面骤冷回缩。'\n    ]\n  },\n  d042: { name: '米饭(小份)', confirmed: false,\n    ingredients: '大米、饮用水',\n    steps: [\n      '大米淘洗后，按米种和批次加水，在饭锅内蒸煮至软熟。',\n      '煮好后稍焖，再用饭铲从边缘松开米粒。',\n      '按小份餐具分装，留出碗口空间，趁热供应。'\n    ]\n  },\n  d043: { name: '米饭(大份)', confirmed: false,\n    ingredients: '大米、饮用水',\n    steps: [\n      '将淘过的大米加水入饭锅，按米种调整用水并煮熟。',\n      '出锅前稍焖再翻松，分装时从不同位置取饭，让米粒口感均匀。',\n      '按大份规格用相应餐具盛装，不把饭压实。'\n    ]\n  },\n  d044: { name: '酸甜萝卜条', confirmed: false,\n    ingredients: '白萝卜、糖、米醋、盐',\n    steps: [\n      '萝卜去皮切匀条，拌少量盐短时出水，再倒掉多余汁液。',\n      '另把糖和米醋拌匀，与萝卜条混合，让各面都沾到酸甜汁。',\n      '加盖冷藏至入味，供应时沥去多余汁水，保留萝卜脆感。'\n    ]\n  },\n  d045: { name: '酥炸花生米', confirmed: false,\n    ingredients: '花生米、食用油、盐',\n    steps: [\n      '挑净花生米，尽量用大小相近、表面干燥的颗粒。',\n      '花生入油后用中小火翻动，炸到颜色均匀、香气出来，立即捞出沥油。',\n      '趁温热拌少量盐，摊开散热，冷却后再装盘保持酥脆。'\n    ]\n  },\n  d046: { name: '凉拌黄瓜', confirmed: false,\n    ingredients: '黄瓜、蒜末、醋、生抽、香油',\n    steps: [\n      '黄瓜清洗后用干净的即食案板拍裂，切成适口块，再沥去多余水分。',\n      '蒜末与醋、生抽、香油拌成味汁，先尝咸酸再决定是否加盐。',\n      '上桌前把味汁拌入黄瓜，现拌现盛，避免长时间浸泡变软。'\n    ]\n  },\n  d047: { name: '江小白', confirmed: false, serving: true,\n    steps: ['按点单数量备原包装，核对瓶身品名与实际规格。', '原瓶上桌，按需配小酒杯，不预先调兑。']\n  },\n  d048: { name: '毛铺125ml', confirmed: false, serving: true,\n    steps: ['备毛铺原瓶，按菜单核对 125 ml 规格。', '随单原瓶供应，酒杯按需另配。']\n  },\n  d049: { name: '劲酒125ml', confirmed: false, serving: true,\n    steps: ['取 125 ml 规格的劲酒，交付前核对品名和外包装。', '原瓶上桌，不分装或添加其他饮品。']\n  },\n  d050: { name: '脐橙精酿500ml', confirmed: false, serving: true,\n    steps: ['按 500 ml 规格备货，核对现场的供应容器。', '按餐厅实际供应温度上桌；包装或杯装方式待确认。']\n  },\n  d051: { name: '脐橙精酿1L', confirmed: false, serving: true,\n    steps: ['核对 1 L 规格，避免与 500 ml 单品混淆。', '按实际容器供应，可按需配分享杯；包装形式待确认。']\n  },\n  d052: { name: '百威500ml', confirmed: false, serving: true,\n    steps: ['按菜单核对百威 500 ml 原包装，常温或冰镇看现场库存。', '保留原包装上桌，酒杯另配。']\n  },\n  d053: { name: '可乐', confirmed: false, serving: true,\n    steps: ['按单备可乐原包装，不推定品牌或容量，以现场供应为准。', '按可选温度供应，冰块如有需要可另配。']\n  },\n  d054: { name: '雪碧', confirmed: false, serving: true,\n    steps: ['取雪碧原包装，交付前核对品名，包装规格以现场供应为准。', '常温或冰镇按库存供应；不与其他饮料混兑。']\n  },\n  d055: { name: '椰汁', confirmed: false, serving: true,\n    steps: ['备椰汁，核对现场供应品牌及包装；先按原包装饮品占位。', '按点单数量上桌，是否配杯以餐厅服务方式为准。']\n  },\n  d056: { name: '水溶C', confirmed: false, serving: true,\n    steps: ['按单备水溶C原包装，具体口味和容量以现场供应为准。', '按实际可选温度供应，不预先兑水。']\n  },\n  d057: { name: '加多宝', confirmed: false, serving: true,\n    steps: ['核对加多宝原包装及数量，具体包装规格以现场供应为准。', '按可选温度供应，按需配杯。']\n  },\n  d058: { name: '蜂蜜水', confirmed: false,\n    ingredients: '蜂蜜、饮用水',\n    steps: [\n      '用干净的杯具取蜂蜜，另备适合入口的温饮用水。',\n      '先加少量温水搅至蜂蜜溶解，再加水至出品份量。',\n      '供应前搅匀，避免杯底残留蜂蜜，使整杯甜度一致。'\n    ]\n  }\n};\n","/data/menu.js":"// 待核对：2026-11-18 按照片转录，用户后续核对。\n// 来源：用户 2026-11-18 发来的菜单照片。价格单位：元，单位 份（除注明外）。\n// 不确定的菜名：红烧洋全全鱼、宽苹菇炒五花肉（照片字迹不清，见 docs/miniapp/decisions.md）。\n// 菜品示意图在 images/dishes/，以菜品 ID 命名。联调后台上传的实拍图可覆盖默认配图。\nconst CATEGORIES = [\n  { id: 'c1', name: '招牌必点', dishes: [\n    { id: 'd001', name: '黄焖溪石斑鱼', price: 128, unit: '份', image: '/images/dishes/d001.jpg' },\n    { id: 'd002', name: '煎焖洋尖', price: 98, unit: '份', image: '/images/dishes/d002.jpg' },\n    { id: 'd003', name: '翘嘴两吃', price: 188, unit: '份', image: '/images/dishes/d003.jpg', imageSquare: true },\n    { id: 'd004', name: '红烧鳊鱼', price: 88, unit: '份', image: '/images/dishes/d004.jpg' },\n    { id: 'd005', name: '酸菜炒石鱼', price: 58, unit: '份', image: '/images/dishes/d005.jpg' },\n    { id: 'd006', name: '红烧洋全全鱼', price: 98, unit: '份', image: '/images/dishes/d006.jpg' },\n    { id: 'd007', name: '清蒸鳊鱼', price: 88, unit: '份', image: '/images/dishes/d007.jpg' },\n  ] },\n  { id: 'c3', name: '特色主打', dishes: [\n    { id: 'd008', name: '小炒烧牛肉', price: 68, unit: '份', image: '/images/dishes/d008.jpg' },\n    { id: 'd009', name: '红葱煎炒走地鸡', price: 68, unit: '份', image: '/images/dishes/d009.jpg' },\n    { id: 'd010', name: '椒盐羊排', price: 168, unit: '份', image: '/images/dishes/d010.jpg' },\n    { id: 'd011', name: '糖醋咕噜肉', price: 58, unit: '份', image: '/images/dishes/d011.jpg' },\n    { id: 'd012', name: '藕带炒牛肉', price: 68, unit: '份', image: '/images/dishes/d012.jpg' },\n    { id: 'd013', name: '农家炒笋片', price: 48, unit: '份', image: '/images/dishes/d013.jpg' },\n    { id: 'd014', name: '宽苹菇炒五花肉', price: 68, unit: '份', image: '/images/dishes/d014.jpg' },\n    { id: 'd015', name: '油渣炒尖椒', price: 38, unit: '份', image: '/images/dishes/d015.jpg' },\n  ] },\n  { id: 'c4', name: '特色小炒', dishes: [\n    { id: 'd016', name: '毛豆肉丁', price: 38, unit: '份', image: '/images/dishes/d016.jpg' },\n    { id: 'd017', name: '农家烧豆腐', price: 32, unit: '份', image: '/images/dishes/d017.jpg' },\n    { id: 'd018', name: '松子玉米', price: 32, unit: '份', image: '/images/dishes/d018.jpg' },\n    { id: 'd019', name: '西红柿炒鸡蛋', price: 32, unit: '份', image: '/images/dishes/d019.jpg' },\n    { id: 'd020', name: '银鱼水蒸蛋', price: 58, unit: '份', image: '/images/dishes/d020.jpg' },\n    { id: 'd021', name: '水蒸蛋', price: 28, unit: '份', image: '/images/dishes/d021.jpg' },\n    { id: 'd022', name: '土豆丝(清炒/酸辣)', price: 28, unit: '份', image: '/images/dishes/d022.jpg', variants: [{ id: 'plain', name: '清炒' }, { id: 'sour-spicy', name: '酸辣' }] },\n    { id: 'd023', name: '辣椒炒肉', price: 48, unit: '份', image: '/images/dishes/d023.jpg' },\n    { id: 'd024', name: '干煸豆角', price: 38, unit: '份', image: '/images/dishes/d024.jpg' },\n    { id: 'd025', name: '鱼香茄子', price: 28, unit: '份', image: '/images/dishes/d025.jpg' },\n    { id: 'd026', name: '苦瓜炒鸡蛋', price: 32, unit: '份', image: '/images/dishes/d026.jpg' },\n    { id: 'd027', name: '时蔬', price: 28, unit: '份', image: '/images/dishes/d027.jpg' },\n  ] },\n  { id: 'c5', name: '山野汤品', dishes: [\n    { id: 'd028', name: '银鱼鸡蛋汤', price: 68, unit: '份', image: '/images/dishes/d028.jpg' },\n    { id: 'd029', name: '苦瓜排骨肉片汤', price: 48, unit: '份', image: '/images/dishes/d029.jpg' },\n    { id: 'd030', name: '一鱼两吃', price: 188, unit: '份', image: '/images/dishes/d030.jpg', imageSquare: true },\n    { id: 'd031', name: '苦瓜皮蛋汤', price: 38, unit: '份', image: '/images/dishes/d031.jpg' },\n  ] },\n  { id: 'c6', name: '新品龙虾', dishes: [\n    { id: 'd032', name: '香辣小龙虾', price: 128, unit: '份', image: '/images/dishes/d032.jpg' },\n    { id: 'd033', name: '蒜蓉小龙虾', price: 128, unit: '份', image: '/images/dishes/d033.jpg' },\n    { id: 'd034', name: '小龙虾2份', price: 198, unit: '份', image: '/images/dishes/d034.jpg', imageSquare: true },\n  ] },\n  { id: 'c7', name: '鲜饮', showPreparation: false, dishes: [\n    { id: 'd035', name: '酸梅汤', price: 18, unit: '份', image: '/images/dishes/d035.jpg', imageSquare: true },\n    { id: 'd036', name: '百香果饮', price: 28, unit: '份', image: '/images/dishes/d036.jpg', imageSquare: true },\n    { id: 'd037', name: '金瓜米乳(热饮)', price: 28, unit: '份', image: '/images/dishes/d037.jpg', imageSquare: true },\n    { id: 'd038', name: '五谷米乳(热饮)', price: 28, unit: '份', image: '/images/dishes/d038.jpg', imageSquare: true },\n  ] },\n  { id: 'c8', name: '主食', showPreparation: false, dishes: [\n    { id: 'd039', name: '手工水饺', price: 38, unit: '份', image: '/images/dishes/d039.jpg' },\n    { id: 'd040', name: '炒饭(蛋/肉)', price: 28, unit: '份', image: '/images/dishes/d040.jpg', variants: [{ id: 'egg', name: '蛋' }, { id: 'meat', name: '肉' }] },\n    { id: 'd041', name: '开花馒头', price: 28, unit: '份', image: '/images/dishes/d041.jpg' },\n    { id: 'd042', name: '米饭(小份)', price: 8, unit: '份', image: '/images/dishes/d042.jpg' },\n    { id: 'd043', name: '米饭(大份)', price: 15, unit: '份', image: '/images/dishes/d043.jpg' },\n    { id: 'd059', name: '米饭（盒装）', price: 3, unit: '份', image: '/images/dishes/d059.jpg', imageSquare: true },\n  ] },\n  { id: 'c9', name: '私厨小食', dishes: [\n    { id: 'd044', name: '酸甜萝卜条', price: 18, unit: '份', image: '/images/dishes/d044.jpg' },\n    { id: 'd045', name: '酥炸花生米', price: 18, unit: '份', image: '/images/dishes/d045.jpg' },\n    { id: 'd046', name: '凉拌黄瓜', price: 18, unit: '份', image: '/images/dishes/d046.jpg' },\n  ] },\n  { id: 'c10', name: '云雾酒水', showPreparation: false, dishes: [\n    { id: 'd047', name: '江小白', price: 22, unit: '份', image: '/images/dishes/d047.jpg', imageSquare: true },\n    { id: 'd048', name: '毛铺125ml', price: 25, unit: '份', image: '/images/dishes/d048.jpg', imageSquare: true },\n    { id: 'd049', name: '劲酒125ml', price: 20, unit: '份', image: '/images/dishes/d049.jpg', imageSquare: true },\n    { id: 'd050', name: '脐橙精酿500ml', price: 10, unit: '份', image: '/images/dishes/d050.jpg', imageSquare: true },\n    { id: 'd051', name: '脐橙精酿1L', price: 18, unit: '份', image: '/images/dishes/d051.jpg', imageSquare: true },\n    { id: 'd052', name: '百威500ml', price: 15, unit: '份', image: '/images/dishes/d052.jpg', imageSquare: true },\n    { id: 'd053', name: '可乐', price: 5, unit: '份', image: '/images/dishes/d053.jpg', imageSquare: true },\n    { id: 'd054', name: '雪碧', price: 5, unit: '份', image: '/images/dishes/d054.jpg', imageSquare: true },\n    { id: 'd055', name: '椰汁', price: 10, unit: '份', image: '/images/dishes/d055.jpg', imageSquare: true },\n    { id: 'd056', name: '水溶C', price: 8, unit: '份', image: '/images/dishes/d056.jpg', imageSquare: true },\n    { id: 'd057', name: '加多宝', price: 6, unit: '份', image: '/images/dishes/d057.jpg', imageSquare: true },\n    { id: 'd058', name: '蜂蜜水', price: 15, unit: '份', image: '/images/dishes/d058.jpg', imageSquare: true },\n  ] },\n];\nfunction setChanges(added, removed, overrides) {\n  var hidden = new Set(removed);\n  module.exports.CATEGORIES = CATEGORIES.map(function (category) {\n    return { ...category, dishes: category.dishes.filter(dish => !hidden.has(dish.id))\n      .concat(added.filter(dish => dish.categoryId === category.id))\n      .map(dish => ({ ...dish, ...(overrides || {})[dish.id] })) };\n  });\n}\nfunction findDish(id) {\n  var categories = module.exports.CATEGORIES;\n  for (var i = 0; i < categories.length; i++) {\n    var list = categories[i].dishes;\n    for (var j = 0; j < list.length; j++) { if (list[j].id === id) return list[j]; }\n  }\n  return null;\n}\nmodule.exports = { CATEGORIES: CATEGORIES, findDish: findDish, setChanges: setChanges };\n","/utils/availability.js":"var backend = require('./backend.js');\nvar store = require('./store.js');\nvar menu = require('../data/menu.js');\nvar live = require('./live.js');\nvar current = { soldOut: {} };\nvar signature = '';\nvar pending;\nvar updatedAt = 0;\n\nfunction fetchAvailability(force) {\n  if (pending && force) return pending.then(function () { return fetchAvailability(true); });\n  if (!pending && !force && Date.now() - updatedAt < 2000) return Promise.resolve(current);\n  if (!pending) {\n    pending = backend.availability().then(function (result) {\n      if (!Array.isArray(result.soldOut)) return current;\n      updatedAt = Date.now();\n      var ids = result.soldOut.slice().sort();\n      var catalog = result.catalog || {};\n      var changes = result.changes || { added: [], removed: [] };\n      var key = JSON.stringify([ids, catalog, changes]);\n      if (key !== signature) {\n        signature = key;\n        var soldOut = {};\n        ids.forEach(function (id) { if (/^d\\d+$/.test(id)) soldOut[id] = '已沽清'; });\n        changes.removed.forEach(function (id) { soldOut[id] = '已下架'; });\n        current = { soldOut: soldOut };\n        var overrides = {};\n        Object.keys(catalog).forEach(function (id) {\n          var item = catalog[id];\n          overrides[id] = { price: item.price };\n          if (item.name) overrides[id].name = item.name;\n          if (item.image) overrides[id].image = backend.imageUrl(item.image);\n        });\n        store.setCatalog(overrides);\n        menu.setChanges(changes.added, changes.removed, overrides);\n      }\n      return current;\n    }).finally(function () { pending = null; });\n  }\n  return pending;\n}\n\nfunction apply(page, watcher, snapshot, force) {\n  if (page.stockWatcher !== watcher || (!force && watcher.previous === snapshot)) return;\n  watcher.previous = snapshot;\n  watcher.update(snapshot.soldOut);\n}\n\nfunction refresh(page, force = true) {\n  var watcher = page.stockWatcher;\n  if (!watcher) return;\n  return fetchAvailability(force).then(function (soldOut) { apply(page, watcher, soldOut, force); }).catch(function () {});\n}\n\nfunction watch(page, update) {\n  stop(page);\n  var watcher = { update: update || function (soldOut) { page.setData({ soldOut: soldOut }); } };\n  if (!backend.enabled()) {\n    watcher.update({});\n    return;\n  }\n  page.stockWatcher = watcher;\n  apply(page, watcher, current);\n  live.watch(page, function () { return refresh(page, true); });\n}\n\nfunction stop(page) {\n  if (!page.stockWatcher) return;\n  live.stop(page);\n  page.stockWatcher = null;\n}\n\nfunction hasSoldOut(cart, soldOut) {\n  return cart.some(function (item) { return !!soldOut[item.id]; });\n}\n\nmodule.exports = { watch: watch, stop: stop, refresh: refresh, hasSoldOut: hasSoldOut };\n","/utils/backend.js":"var guestRequest;\nvar submitting = {};\nvar guestCache;\nvar verifiedGuest;\n\nfunction baseUrl() {\n  return (getApp().globalData.backendUrl || '').replace(/\\/+$/, '');\n}\n\nfunction request(path, method, data, token, timeout = 8000) {\n  var task;\n  var pending = new Promise(function (resolve, reject) {\n    var header = { 'content-type': 'application/json' };\n    if (token) header['x-yunwu-guest'] = token;\n    task = wx.request({\n      url: baseUrl() + '/api/' + path,\n      method: method || 'GET',\n      header: header,\n      data: data,\n      timeout: timeout,\n      success: function (result) {\n        if (result.statusCode >= 200 && result.statusCode < 300) resolve(result.data);\n        else {\n          var error = new Error((result.data && result.data.message) || '服务暂不可用，请重试');\n          error.statusCode = result.statusCode;\n          error.code = result.data?.code;\n          reject(error);\n        }\n      },\n      fail: function () { reject(new Error('无法连接餐厅服务，请稍后再试')); }\n    });\n  });\n  pending.abort = function () { if (task && task.abort) task.abort(); };\n  return pending;\n}\n\nfunction guestStorageKey() { return 'yunwu_guest_token:' + baseUrl(); }\n\nfunction storedGuest() {\n  try { return wx.getStorageSync(guestStorageKey()); } catch (error) { return ''; }\n}\n\nfunction guest(timeout) {\n  var stored = storedGuest();\n  if (stored && verifiedGuest === stored) return Promise.resolve(stored);\n  if (!guestRequest) {\n    var key = guestStorageKey();\n    guestRequest = request('guest/session', 'POST', {}, stored || undefined, timeout).then(function (session) {\n      wx.setStorageSync(key, session.token);\n      verifiedGuest = session.token;\n      return session.token;\n    }).finally(function () { guestRequest = undefined; });\n  }\n  return guestRequest;\n}\n\nfunction guestApi(path, method, data, timeout) {\n  return guest(timeout).then(function (token) { return request('guest/' + path, method, data, token, timeout); });\n}\n\nfunction cacheForGuest(token) {\n  var key = baseUrl() + ':' + token;\n  if (guestCache?.key !== key) guestCache = { key: key, history: {}, recentOrder: null };\n  return guestCache;\n}\n\nfunction readHistory(kind, fresh, timeout) {\n  return guest(timeout).then(function (token) {\n    var cache = cacheForGuest(token);\n    var history = cache.history;\n    var entry = history[kind] || (history[kind] = { updatedAt: 0 });\n    if (entry.pending) return entry.pending;\n    if (!fresh && entry.records && Date.now() - entry.updatedAt < 3000) return entry.records;\n    entry.pending = request('guest/' + kind, 'GET', undefined, token, timeout).then(function (records) {\n      if (cache === guestCache && history !== cache.history) return readHistory(kind, true, timeout);\n      entry.records = records;\n      entry.updatedAt = Date.now();\n      return records;\n    }).finally(function () { entry.pending = null; });\n    return entry.pending;\n  });\n}\n\nfunction rememberSubmission(kind, token, record) {\n  var cache = cacheForGuest(token);\n  cache.history = {};\n  if (kind === 'orders') cache.recentOrder = record;\n}\n\nfunction cachedOrder(id) {\n  var token = storedGuest();\n  if (!token || guestCache?.key !== baseUrl() + ':' + token) return null;\n  if (guestCache.recentOrder?.id === id) return guestCache.recentOrder;\n  return guestCache.history.orders?.records?.find((record) => record.id === id) || null;\n}\n\nfunction requestId() {\n  return Date.now().toString(36) + '-' + Math.random().toString(36).slice(2);\n}\n\nfunction submissionKey(kind, token) {\n  return 'yunwu_pending:' + baseUrl() + ':' + token + ':' + kind;\n}\n\nfunction pendingSubmission(kind) {\n  var token = storedGuest();\n  try { return !!(token && wx.getStorageSync(submissionKey(kind, token))); } catch (error) { return false; }\n}\n\nasync function withSubmission(kind, run) {\n  if (submitting[kind]) throw new Error('请等待当前请求完成');\n  submitting[kind] = true;\n  try {\n    var token = await guest();\n    return await run(token, submissionKey(kind, token));\n  } finally {\n    delete submitting[kind];\n  }\n}\n\nfunction clearSubmission(key) {\n  try { wx.removeStorageSync(key); } catch (error) {}\n}\n\nfunction submit(kind, draft) {\n  return withSubmission(kind, async function (token, key) {\n    if (wx.getStorageSync(key)) throw new Error('请先查询上次提交结果');\n    var id = requestId();\n    wx.setStorageSync(key, id);\n    var record;\n    try {\n      record = await request('guest/' + kind, 'POST', { ...draft, requestId: id }, token);\n    } catch (error) {\n      if ([400, 401, 404, 409, 413, 415, 429].includes(error.statusCode) && error.code !== 'submission_saved') clearSubmission(key);\n      throw error;\n    }\n    if (!record || !record.id) throw new Error('暂未确认提交结果');\n    clearSubmission(key);\n    rememberSubmission(kind, token, record);\n    return record;\n  });\n}\n\nfunction checkSubmission(kind) {\n  return withSubmission(kind, async function (token, key) {\n    var id = wx.getStorageSync(key);\n    if (!id) return null;\n    var result = await request('guest/' + kind + '/check-submission', 'POST', { requestId: id }, token);\n    if (!result || (result.record !== null && !result.record?.id)) throw new Error('暂未确认提交结果');\n    clearSubmission(key);\n    if (result.record) rememberSubmission(kind, token, result.record);\n    return result.record;\n  });\n}\n\nmodule.exports = {\n  enabled: function () { return !!baseUrl(); },\n  pendingSubmission: pendingSubmission,\n  checkSubmission: checkSubmission,\n  order: function (order) { return submit('orders', order); },\n  orders: function (fresh) { return readHistory('orders', fresh, 5000); },\n  cachedOrder: cachedOrder,\n  getOrder: function (id) { return guestApi('orders/' + encodeURIComponent(id)); },\n  reserve: function (reservation) { return submit('reservations', reservation); },\n  reservations: function (fresh) { return readHistory('reservations', fresh); },\n  preparation: function (id) { return request('preparations/' + encodeURIComponent(id)); },\n  availability: function () { return request('availability'); },\n  updates: function (version) { return request('updates?since=' + encodeURIComponent(version || ''), 'GET', undefined, undefined, 25000); },\n  paymentOptions: function () { return request('payment-options'); },\n  hall: function (date, slot, partySize) {\n    var path = 'hall?date=' + encodeURIComponent(date || '') + '&slot=' + encodeURIComponent(slot || '');\n    if (partySize) path += '&partySize=' + encodeURIComponent(partySize);\n    if (date || slot) return request(path, 'GET', undefined, storedGuest() || undefined);\n    return guest().then(token => request(path, 'GET', undefined, token));\n  },\n  imageUrl: function (path) { return baseUrl() + path; },\n  privateRooms: function (date, slot, partySize) {\n    return request('rooms?date=' + encodeURIComponent(date || '') + '&slot=' + encodeURIComponent(slot || '') + '&partySize=' + partySize);\n  }\n};\n","/utils/contact-phone.js":"function normalizePhone(value) {\n  var phone = typeof value === 'string' ? value.trim() : '';\n  return /^1\\d{10}$/.test(phone) ? phone : '';\n}\n\nmodule.exports = { normalizePhone: normalizePhone };\n","/utils/hall.js":"var backend = require('./backend.js');\nvar rules = require('../config/booking-rules.js');\nvar store = require('./store.js');\n\nfunction fullNotice(code) {\n  var content = rules.hallCapacity.message(code);\n  wx.showModal({ title: '温馨提示', content, showCancel: false, confirmText: '知道了' });\n}\n\nfunction offline(date, slot, partySize) {\n  var visit = !date && !slot;\n  var now = rules.restaurantTime();\n  date = date || now.slice(0, 10);\n  var meal = rules.mealForSlot(slot || now.slice(11, 16));\n  var booked = store.getReservations().filter(r => r.type === 'hall' && r.date === date &&\n    rules.mealForSlot(r.slot) === meal && ['待确认', '已确认', '已到店'].includes(r.status))\n    .map(r => ({ owner: 'local', size: r.partySize }));\n  var seatedSize = 0;\n  for (var order of store.getOrders()) {\n    if (order.deliveryType !== 'hall' || order.reservationId || !order.partySize || !order.createdAt) continue;\n    var time = new Date(order.createdAt);\n    if (!Number.isFinite(time.getTime())) continue;\n    var stamp = rules.restaurantTime(time);\n    if (stamp.slice(0, 10) === date && rules.mealForSlot(stamp.slice(11, 16)) === meal) seatedSize = Math.max(seatedSize, order.partySize);\n  }\n  var seated = seatedSize ? [{ owner: 'local', size: seatedSize }] : [];\n  return rules.hallCapacity.availability(booked, seated, { owner: 'local', visit, partySize: partySize || 1 });\n}\n\nfunction check(date, slot, partySize) {\n  if (!backend.enabled()) return Promise.resolve(offline(date, slot, partySize));\n  return backend.hall(date, slot, partySize);\n}\n\nmodule.exports = { check: check, fullNotice: fullNotice, offline: offline };\n","/utils/live.js":"var backend = require('./backend.js');\nvar watchers = new Set();\nvar version = '';\nvar running;\nvar timer;\nvar generation = 0;\nvar paused = false;\nvar online = true;\nvar retry = 1000;\n\nfunction notify() {\n  watchers.forEach(run);\n}\n\nfunction run(watcher) {\n  if (watcher.pending) { watcher.dirty = true; return; }\n  watcher.pending = true;\n  Promise.resolve().then(function () {\n    if (!paused && online && watchers.has(watcher)) return watcher.update();\n  }).catch(function () {}).finally(function () {\n    watcher.pending = false;\n    if (watcher.dirty && !paused && online && watchers.has(watcher)) {\n      watcher.dirty = false;\n      run(watcher);\n    }\n  });\n}\n\nfunction listen() {\n  if (paused || !online || !watchers.size || running || !backend.enabled()) return;\n  var current = generation;\n  var next = 0;\n  running = backend.updates(version);\n  running.then(function (result) {\n    if (generation !== current) return;\n    retry = 1000;\n    version = result.version;\n    // The heartbeat also retries reads interrupted by a brief network failure.\n    notify();\n  }).catch(function () {\n    next = retry;\n    retry = Math.min(retry * 2, 15000);\n  }).finally(function () {\n    if (generation !== current) return;\n    running = null;\n    if (!paused && online && watchers.size) timer = setTimeout(listen, next);\n  });\n}\n\nfunction disconnect() {\n  generation++;\n  clearTimeout(timer);\n  if (running && running.abort) running.abort();\n  running = null;\n}\n\nfunction stop(page) {\n  if (!page.liveWatcher) return;\n  watchers.delete(page.liveWatcher);\n  page.liveWatcher = null;\n  if (!watchers.size) disconnect();\n}\n\nfunction watch(page, update) {\n  stop(page);\n  if (!backend.enabled()) { update(); return; }\n  page.liveWatcher = { update: update };\n  watchers.add(page.liveWatcher);\n  run(page.liveWatcher);\n  listen();\n}\n\nfunction pause() { paused = true; disconnect(); }\nfunction resume() { paused = false; notify(); listen(); }\nfunction networkChanged(connected) {\n  online = connected;\n  disconnect();\n  if (online && !paused) { notify(); listen(); }\n}\n\nmodule.exports = { watch: watch, stop: stop, pause: pause, resume: resume, networkChanged: networkChanged };\n","/utils/pay.js":"var shownReservationPayments = new Set();\n\nfunction showReservationPaymentNotice(record) {\n  if (!record || record.paymentStatus !== '已支付' || !record.id) return false;\n  var key = 'yunwu_reservation_payment_notice:' + record.id;\n  if (shownReservationPayments.has(key)) return false;\n  try { if (wx.getStorageSync(key)) return false; } catch (error) {}\n  shownReservationPayments.add(key);\n  wx.showModal({\n    title: '支付成功',\n    content: '如行程有变，请提前半小时联系餐厅取消。',\n    showCancel: false,\n    confirmText: '知道了',\n    success: ({ confirm }) => {\n      if (!confirm) {\n        shownReservationPayments.delete(key);\n        return;\n      }\n      try { wx.setStorageSync(key, true); } catch (error) {}\n    },\n    fail: () => shownReservationPayments.delete(key)\n  });\n  return true;\n}\nmodule.exports = { showReservationPaymentNotice };\n","/utils/reservation-orders.js":"var bookingRules = require('../config/booking-rules.js');\n\nfunction canOrderForReservation(booking) {\n  if (!booking) return false;\n  if (booking.status === '已到店') return booking.date === bookingRules.restaurantTime().slice(0, 10);\n  return ['待确认', '已确认'].includes(booking.status) && !bookingRules.isPastSlot(booking.date, booking.slot);\n}\n\nfunction withReservationOrders(bookings, orders) {\n  var byBooking = new Map();\n  for (var order of orders) {\n    if (!order.reservationId) continue;\n    if (!byBooking.has(order.reservationId)) byBooking.set(order.reservationId, []);\n    byBooking.get(order.reservationId).push({\n      id: order.id, items: order.items, total: order.total, status: order.status,\n      paymentStatus: order.paymentStatus\n    });\n  }\n  return bookings.map((booking) => ({ ...booking, orders: byBooking.get(booking.id) || [] }));\n}\n\nmodule.exports = { canOrderForReservation: canOrderForReservation, withReservationOrders: withReservationOrders };\n","/utils/store.js":"// 本地存储是 MVP 的唯一事实来源（未绑定后端前）。\n// 键：yunwu_cart 购物车，yunwu_orders 已提交订单，yunwu_reservations 预约，\n// 客房房号由扫一扫填入，在小程序本次前台运行期间使用。\n// 订单状态只能由厨房网页版后台更新；本小程序不提供改状态的入口。\nvar menuData = require('../data/menu.js');\nvar catalog = {};\nvar CART_KEY = 'yunwu_cart';\nvar ORDERS_KEY = 'yunwu_orders';\nvar RESV_KEY = 'yunwu_reservations';\n\nfunction read(key, fallback) {\n  try { var v = wx.getStorageSync(key); return v === '' || v === undefined || v === null ? fallback : v; }\n  catch (e) { return fallback; }\n}\nfunction write(key, value) { try { wx.setStorageSync(key, value); } catch (e) {} }\n\nfunction setCatalog(overrides) { catalog = overrides; }\nfunction currentDish(dish) { return dish ? { ...dish, ...catalog[dish.id] } : null; }\nfunction lineKey(id, variantId) { return variantId ? id + ':' + variantId : id; }\nfunction getCart() {\n  return read(CART_KEY, []).map(function (item) {\n    var dish = currentDish(menuData.findDish(item.id));\n    var price = dish ? dish.price : item.price;\n    var variant = dish && dish.variants && dish.variants.find((entry) => entry.id === item.variantId);\n    return {\n      ...item, name: dish ? dish.name : item.name, price: price, lineKey: lineKey(item.id, item.variantId),\n      subtotal: Math.round(price * 100) * item.qty / 100,\n      requiresVariant: !!(dish && dish.variants && dish.variants.length && !variant)\n    };\n  });\n}\nfunction saveCart(cart) { write(CART_KEY, cart); }\nfunction addToCart(dish, qty, variantId) {\n  var cart = getCart();\n  var variant = dish.variants && dish.variants.find((entry) => entry.id === variantId);\n  if (dish.variants && dish.variants.length && !variant) return false;\n  var key = lineKey(dish.id, variant && variant.id);\n  var found = cart.find((item) => item.lineKey === key);\n  if (found) found.qty += qty;\n  else cart.push({\n    id: dish.id, lineKey: key, name: dish.name, price: dish.price, unit: dish.unit, qty: qty,\n    ...(variant ? { variantId: variant.id, variantName: variant.name } : {})\n  });\n  saveCart(cart);\n  return cart;\n}\nfunction setQty(key, qty) {\n  var cart = getCart().map((item) => item.lineKey === key ? { ...item, qty: qty } : item)\n    .filter((item) => item.qty > 0);\n  saveCart(cart);\n  return cart;\n}\nfunction clearCart() { saveCart([]); }\nfunction cartCount(cart) {\n  var c = 0; (cart || getCart()).forEach(function (it) { c += it.qty; }); return c;\n}\nfunction cartTotal(cart) {\n  return (cart || getCart()).reduce((total, item) => total + Math.round(item.price * 100) * item.qty, 0) / 100;\n}\nfunction getOrders() { return read(ORDERS_KEY, []); }\nfunction createOrder(order) {\n  var orders = getOrders();\n  orders.unshift(order);\n  write(ORDERS_KEY, orders);\n  return order;\n}\nfunction getOrder(id) {\n  var orders = getOrders();\n  for (var i = 0; i < orders.length; i++) { if (orders[i].id === id) return orders[i]; }\n  return null;\n}\nfunction getReservations() { return read(RESV_KEY, []); }\nfunction saveReservation(r) {\n  var list = getReservations();\n  list.unshift(r);\n  write(RESV_KEY, list);\n  return r;\n}\nfunction makeId(prefix) {\n  var d = new Date();\n  function p(x) { return (x < 10 ? '0' : '') + x; }\n  return prefix + d.getFullYear() + p(d.getMonth() + 1) + p(d.getDate()) + p(d.getHours()) + p(d.getMinutes()) + p(d.getSeconds()) +\n    '-' + Math.random().toString(36).slice(2, 8);\n}\n\nmodule.exports = {\n  setCatalog: setCatalog, currentDish: currentDish,\n  getCart: getCart, saveCart: saveCart, addToCart: addToCart, setQty: setQty,\n  clearCart: clearCart, cartCount: cartCount, cartTotal: cartTotal,\n  getOrders: getOrders, createOrder: createOrder, getOrder: getOrder,\n  getReservations: getReservations, saveReservation: saveReservation, makeId: makeId\n};\n","/utils/submission.js":"var bookingRules = require('../config/booking-rules.js');\n\nfunction text(value) {\n  return typeof value === 'string' ? value.trim() : '';\n}\n\nfunction sameItems(saved, draft) {\n  if (!Array.isArray(draft) || saved.length !== draft.length) return false;\n  return saved.every(function (item, index) {\n    var next = draft[index];\n    return next && item.id === next.id && item.qty === next.qty &&\n      (item.variantId || '') === (next.variantId || '') &&\n      (next.price === undefined || item.price === next.price);\n  });\n}\n\nfunction matchesSubmission(kind, record, draft) {\n  if (record.remark !== text(draft.remark)) return false;\n  if (kind === 'reservations') {\n    return record.phone === text(draft.phone) && record.type === draft.type &&\n      record.date === text(draft.date) && record.slot === draft.slot &&\n      record.partySize === draft.partySize && record.name === text(draft.name) &&\n      (record.type !== 'private' || record.roomId === draft.roomId);\n  }\n  if ((record.paymentMethod || 'offline') !== (draft.paymentMethod || 'offline')) return false;\n  if (record.deliveryType !== draft.deliveryType || (record.reservationId || '') !== text(draft.reservationId)) return false;\n  if (record.reservationId) return sameItems(record.items, draft.items);\n  return record.phone === text(draft.phone) && record.contactName === text(draft.contactName) &&\n    (record.deliveryType === 'room' ? record.room === bookingRules.normalizeRoom(draft.room) :\n      record.partySize === undefined ? record.tableNo === text(draft.tableNo) : record.partySize === draft.partySize) &&\n    sameItems(record.items, draft.items);\n}\n\nmodule.exports = { matchesSubmission: matchesSubmission };\n","/pages/index/index.js":"var menuData = require('../../data/menu.js');\nvar store = require('../../utils/store.js');\nvar availability = require('../../utils/availability.js');\nvar hall = require('../../utils/hall.js');\nPage({\n  data: { room: '', featured: [], showcaseIndex: 0 },\n  refreshFeatured() {\n    var featured = [];\n    menuData.CATEGORIES.forEach(function (c) { if (c.id === 'c3') featured = c.dishes.map(store.currentDish); });\n    this.setData({ featured: featured, showcaseIndex: Math.min(this.data.showcaseIndex, Math.max(0, featured.length - 1)) });\n  },\n  onShow() { this.refreshRoom(); availability.watch(this, () => this.refreshFeatured()); },\n  onHide() { availability.stop(this); },\n  onUnload() { availability.stop(this); },\n  onShowcaseChange(e) { this.setData({ showcaseIndex: e.detail.current }); },\n  goFeaturedDish(e) {\n    var id = e.currentTarget.dataset.id;\n    wx.navigateTo({ url: '/pages/dish/dish?id=' + id });\n  },\n  refreshRoom() {\n    this.setData({ room: getApp().globalData.room });\n  },\n  scanRoom() { getApp().scanRoom(() => this.refreshRoom()); },\n  goRoomOrder() {\n    var app = getApp();\n    var openMenu = (room) => {\n      this.refreshRoom();\n      if (!room) return;\n      app.globalData.reservationOrder = null;\n      app.globalData.guestType = 'room';\n      app.globalData.deliveryType = 'room';\n      wx.switchTab({ url: '/pages/menu/menu' });\n    };\n    if (app.globalData.room) openMenu(app.globalData.room);\n    else app.scanRoom(openMenu);\n  },\n  goHallOrder() {\n    if (this.checkingHall) return;\n    this.checkingHall = true;\n    hall.check().then(result => {\n      if (!result.available) { hall.fullNotice(); return; }\n      var app = getApp();\n      app.globalData.reservationOrder = null;\n      app.globalData.guestType = 'hall';\n      app.globalData.deliveryType = 'hall';\n      wx.switchTab({ url: '/pages/menu/menu' });\n    }).catch(error => wx.showToast({ title: error.message, icon: 'none' }))\n      .finally(() => { this.checkingHall = false; });\n  },\n  goReserve() {\n    var app = getApp();\n    app.globalData.guestType = 'walkin';\n    wx.navigateTo({ url: '/pages/reserve/reserve' });\n  }\n});\n","/pages/menu/menu.js":"var menuData = require('../../data/menu.js');\nvar store = require('../../utils/store.js');\nvar availability = require('../../utils/availability.js');\nPage({\n  data: {\n    categories: [], activeCat: '', categoryName: '', keyword: '', activeDishes: [], cartQty: {}, cartCount: 0, cartTotal: 0, soldOut: {},\n    cartOpen: false, cartItems: [], cartListHeight: 0, reservationOrder: null\n  },\n  onLoad() {\n    var categories = menuData.CATEGORIES;\n    var featured = categories.find((category) => category.id === 'c3') || categories[0];\n    this.setData({ categories: categories, activeCat: featured.id, categoryName: featured.name });\n  },\n  onShow() {\n    this.setData({ reservationOrder: getApp().globalData.reservationOrder });\n    availability.watch(this, (soldOut) => {\n      this.setData({ soldOut: soldOut, categories: menuData.CATEGORIES });\n      this.refresh();\n    });\n  },\n  onHide() { availability.stop(this); },\n  onUnload() { availability.stop(this); },\n  refresh() {\n    var cat = null;\n    for (var i = 0; i < this.data.categories.length; i++) {\n      if (this.data.categories[i].id === this.data.activeCat) cat = this.data.categories[i];\n    }\n    if (!cat) cat = this.data.categories[0];\n    var keyword = this.data.keyword.trim().toLowerCase();\n    var matches = keyword ? this.data.categories.reduce(function (items, group) {\n      return items.concat(group.dishes.filter(function (dish) { return dish.name.toLowerCase().includes(keyword); }));\n    }, []) : (cat ? cat.dishes : []);\n    var cart = store.getCart();\n    var qty = {};\n    cart.forEach(function (it) { qty[it.id] = (qty[it.id] || 0) + it.qty; });\n    this.setData({\n      categoryName: keyword ? '搜索结果' : (cat ? cat.name : ''),\n      activeDishes: matches.map(store.currentDish),\n      cartQty: qty,\n      cartCount: store.cartCount(cart),\n      cartTotal: store.cartTotal(cart),\n      cartItems: cart,\n      cartListHeight: Math.min(4, cart.length) * 68\n    });\n  },\n  onSearch(e) {\n    this.setData({ keyword: e.detail.value });\n    this.refresh();\n  },\n  clearSearch() {\n    this.setData({ keyword: '' });\n    this.refresh();\n  },\n  switchCat(e) {\n    this.setData({ activeCat: e.currentTarget.dataset.id, keyword: '' });\n    this.refresh();\n  },\n  stopTap() {},\n  addQty(e) {\n    var dish = store.currentDish(menuData.findDish(e.currentTarget.dataset.id));\n    if (dish && this.data.soldOut[dish.id]) return;\n    if (dish && dish.variants && dish.variants.length) { this.goDish(e); return; }\n    if (dish) store.addToCart(dish, 1);\n    this.refresh();\n  },\n  decQty(e) {\n    var cart = store.getCart();\n    var cur = 0;\n    cart.forEach(function (it) { if (it.id === e.currentTarget.dataset.id) cur = it.qty; });\n    store.setQty(e.currentTarget.dataset.id, cur - 1);\n    this.refresh();\n  },\n  goDish(e) { wx.navigateTo({ url: '/pages/dish/dish?id=' + e.currentTarget.dataset.id }); },\n  toggleCart() { this.setData({ cartOpen: !this.data.cartOpen }); },\n  clearCart() {\n    wx.showModal({\n      title: '清空购物车',\n      content: '确定移除所有已选菜品吗？',\n      confirmText: '清空',\n      success: ({ confirm }) => {\n        if (!confirm) return;\n        store.clearCart();\n        this.refresh();\n      }\n    });\n  },\n  leaveReservationOrder() {\n    getApp().globalData.reservationOrder = null;\n    this.setData({ reservationOrder: null });\n  },\n  goCart() {\n    this.setData({ cartOpen: false });\n    wx.navigateTo({ url: '/pages/cart/cart' });\n  }\n});\n","/pages/dish/dish.js":"var menuData = require('../../data/menu.js');\nvar preparations = require('../../data/dish-preparations.js');\nvar backend = require('../../utils/backend.js');\nvar store = require('../../utils/store.js');\nvar availability = require('../../utils/availability.js');\nPage({\n  data: { dish: null, categoryName: '', showPreparation: false, preparation: null, qty: 1, soldOut: {}, variantId: '' },\n  onLoad(options) {\n    this.dishId = options.id;\n  },\n  onShow() {\n    availability.watch(this, (soldOut) => this.refreshDish(soldOut));\n  },\n  refreshDish(soldOut) {\n    var dish = menuData.findDish(this.dishId);\n    var category = menuData.CATEGORIES.find((group) => group.dishes.some((item) => item.id === this.dishId));\n    var showPreparation = !!category && category.showPreparation !== false;\n    this.setData({\n      soldOut: soldOut, dish: store.currentDish(dish),\n      categoryName: category ? category.name : '',\n      showPreparation: showPreparation,\n      preparation: showPreparation ? this.data.preparation || preparations[dish.id] || null : null\n    });\n    var query = (this.recipeQuery || 0) + 1;\n    this.recipeQuery = query;\n    if (showPreparation && backend.enabled()) {\n      backend.preparation(dish.id).then((preparation) => {\n        if (this.recipeQuery === query && this.data.dish && this.data.dish.id === dish.id) this.setData({ preparation: preparation });\n      }).catch(() => {});\n    }\n  },\n  onHide() { this.recipeQuery = (this.recipeQuery || 0) + 1; availability.stop(this); },\n  onUnload() { this.onHide(); },\n  addQty() {\n    if (this.data.dish && !this.data.soldOut[this.data.dish.id]) this.setData({ qty: this.data.qty + 1 });\n  },\n  decQty() { if (this.data.qty > 1) this.setData({ qty: this.data.qty - 1 }); },\n  selectVariant(e) { this.setData({ variantId: e.currentTarget.dataset.id }); },\n  addToCart() {\n    if (!this.data.dish || this.data.soldOut[this.data.dish.id]) return;\n    if (!store.addToCart(this.data.dish, this.data.qty, this.data.variantId)) return;\n    wx.showToast({ title: '已加入购物车', icon: 'success' });\n    wx.navigateBack();\n  }\n});\n","/pages/cart/cart.js":"var store = require('../../utils/store.js');\nvar menuData = require('../../data/menu.js');\nvar availability = require('../../utils/availability.js');\nvar hall = require('../../utils/hall.js');\nPage({\n  data: {\n    cart: [], total: 0, soldOut: {}, hasSoldOut: false, hasMissingVariant: false,\n    deliveryType: 'room', canChooseRoom: true, reservationOrder: null\n  },\n  onLoad() {\n    var diner = getApp().globalData;\n    var canChooseRoom = !diner.reservationOrder && diner.guestType !== 'walkin';\n    this.setData({\n      canChooseRoom: canChooseRoom,\n      reservationOrder: diner.reservationOrder || null,\n      deliveryType: canChooseRoom ? diner.deliveryType || 'room' : 'hall'\n    });\n  },\n  onShow() {\n    availability.watch(this, (soldOut) => this.refresh(soldOut));\n  },\n  onHide() { availability.stop(this); },\n  onUnload() { availability.stop(this); },\n  refresh(soldOut = this.data.soldOut) {\n    var cart = store.getCart().map(function (item) {\n      var dish = store.currentDish(menuData.findDish(item.id));\n      return { ...item, image: dish ? dish.image : '' };\n    });\n    this.setData({\n      cart: cart, total: store.cartTotal(cart), soldOut: soldOut,\n      hasSoldOut: availability.hasSoldOut(cart, soldOut),\n      hasMissingVariant: cart.some((item) => item.requiresVariant)\n    });\n  },\n  addQty(e) {\n    var item = this.data.cart.find((entry) => entry.lineKey === e.currentTarget.dataset.id);\n    if (item && !this.data.soldOut[item.id] && !item.requiresVariant) store.setQty(item.lineKey, item.qty + 1);\n    this.refresh();\n  },\n  decQty(e) {\n    var item = this.data.cart.find((entry) => entry.lineKey === e.currentTarget.dataset.id);\n    if (item) store.setQty(item.lineKey, item.qty - 1);\n    this.refresh();\n  },\n  removeItem(e) {\n    store.setQty(e.currentTarget.dataset.id, 0);\n    this.refresh();\n  },\n  chooseDelivery(e) {\n    var type = e.currentTarget.dataset.type;\n    if (this.data.reservationOrder) return;\n    var query = (this.deliveryQuery || 0) + 1;\n    this.deliveryQuery = query;\n    if (type === 'room' && this.data.canChooseRoom) this.setData({ deliveryType: type });\n    if (type === 'hall') {\n      hall.check().then(result => {\n        if (this.deliveryQuery !== query) return;\n        if (!result.available) { hall.fullNotice(); return; }\n        this.setData({ deliveryType: type });\n      }).catch(error => { if (this.deliveryQuery === query) wx.showToast({ title: error.message, icon: 'none' }); });\n    }\n  },\n  clearAll() {\n    wx.showModal({\n      title: '清空购物车',\n      content: '确定移除所有已选菜品吗？',\n      confirmText: '清空',\n      success: ({ confirm }) => {\n        if (!confirm) return;\n        store.clearCart();\n        this.refresh();\n      }\n    });\n  },\n  goConfirm() {\n    if (!this.data.cart.length || this.data.hasSoldOut || this.data.hasMissingVariant) return;\n    wx.navigateTo({ url: '/pages/order-confirm/order-confirm?deliveryType=' + this.data.deliveryType });\n  }\n});\n","/pages/order-confirm/order-confirm.js":"var store = require('../../utils/store.js');\nvar backend = require('../../utils/backend.js');\nvar availability = require('../../utils/availability.js');\nvar bookingRules = require('../../config/booking-rules.js');\nvar hall = require('../../utils/hall.js');\nvar normalizePhone = require('../../utils/contact-phone.js').normalizePhone;\nvar matchesSubmission = require('../../utils/submission.js').matchesSubmission;\nPage({\n  data: {\n    cart: [], total: 0, deliveryType: 'room', guestType: '',\n    room: '', partySize: 0, partyChoices: Array.from({ length: bookingRules.hall.maxPartySize }, (_, i) => i + 1), partyOpen: false,\n    hallAvailable: true, hallCode: '', hallChecking: false, hallError: '',\n    contactName: '', phone: '', bookingHasPhone: false, remark: '', reservationOrder: null, submitting: false, pendingSubmission: false,\n    soldOut: {}, hasSoldOut: false, hasMissingVariant: false, paymentMethod: 'offline', qrAvailable: false\n  },\n  onLoad(options = {}) {\n    var app = getApp();\n    var room = app.globalData.room || '';\n    var guestType = app.globalData.guestType || '';\n    var booking = app.globalData.reservationOrder;\n    var bookingPhone = normalizePhone(booking?.phone);\n    var selected = ['hall', 'room'].includes(options.deliveryType) ? options.deliveryType : app.globalData.deliveryType;\n    var deliveryType = booking || guestType === 'walkin' ? 'hall' : (selected || 'room');\n    this.setData({\n      guestType: guestType, deliveryType: deliveryType, room: room, reservationOrder: booking,\n      contactName: booking?.name || '', phone: bookingPhone, bookingHasPhone: !!bookingPhone\n    });\n  },\n  onShow() {\n    this.refreshRoom();\n    this.updateSubmission();\n    availability.watch(this, (soldOut) => {\n      this.refreshCart(soldOut);\n      this.refreshHall(true);\n      if (backend.enabled()) backend.paymentOptions().then(options => {\n        this.setData({ qrAvailable: !!options.qrPath });\n      }).catch(() => {});\n    });\n  },\n  onHide() { availability.stop(this); },\n  onUnload() { availability.stop(this); },\n  refreshCart(soldOut = this.data.soldOut) {\n    var cart = store.getCart();\n    this.setData({\n      cart: cart, total: store.cartTotal(cart), soldOut: soldOut,\n      hasSoldOut: availability.hasSoldOut(cart, soldOut), hasMissingVariant: cart.some((item) => item.requiresVariant)\n    });\n  },\n  backToCart() { wx.navigateBack(); },\n  onDeliveryChange(e) {\n    var type = e.detail.value;\n    var query = (this.deliveryQuery || 0) + 1;\n    this.deliveryQuery = query;\n    if (type !== 'hall') { this.setData({ deliveryType: type, hallChecking: false }); return; }\n    var previous = this.data.deliveryType;\n    this.setData({ deliveryType: type, hallChecking: true, hallError: '' });\n    hall.check('', '', this.data.partySize).then(result => {\n      if (this.deliveryQuery !== query) return;\n      if (!result.available) hall.fullNotice(result.code);\n      this.setData({ deliveryType: !result.available && result.code !== 'hall_large_full' ? previous : type,\n        hallAvailable: result.available, hallCode: result.code || '', hallError: '' });\n    }).catch(error => {\n      if (this.deliveryQuery !== query) return;\n      this.setData({ deliveryType: previous });\n      wx.showToast({ title: error.message, icon: 'none' });\n    }).finally(() => { if (this.deliveryQuery === query) this.setData({ hallChecking: false }); });\n  },\n  refreshHall(silent) {\n    if (this.data.deliveryType !== 'hall' || this.data.reservationOrder) return;\n    var query = (this.deliveryQuery || 0) + 1;\n    this.deliveryQuery = query;\n    this.setData({ hallChecking: silent !== true, hallError: '' });\n    hall.check('', '', this.data.partySize).then(result => {\n      if (this.deliveryQuery !== query) return;\n      this.setData({ hallAvailable: result.available, hallCode: result.code || '' });\n      if (!result.available && silent !== true) hall.fullNotice(result.code);\n    }).catch(error => { if (this.deliveryQuery === query) this.setData({ hallError: error.message }); })\n      .finally(() => { if (this.deliveryQuery === query) this.setData({ hallChecking: false }); });\n  },\n  toggleParty() { this.setData({ partyOpen: !this.data.partyOpen }); },\n  selectParty(e) {\n    var size = Number(e.currentTarget.dataset.size);\n    if (Number.isInteger(size) && size >= 1 && size <= bookingRules.hall.maxPartySize) {\n      this.setData({ partySize: size, partyOpen: false }, () => this.refreshHall());\n    }\n  },\n  onPaymentChange(e) { this.setData({ paymentMethod: e.detail.value }); },\n  refreshRoom() { this.setData({ room: getApp().globalData.room }); },\n  scanRoom() { getApp().scanRoom(() => this.refreshRoom()); },\n  onNameInput(e) { this.setData({ contactName: e.detail.value }); },\n  onPhoneInput(e) { this.setData({ phone: e.detail.value }); },\n  onRemarkInput(e) { this.setData({ remark: e.detail.value }); },\n  updateSubmission() { this.setData({ pendingSubmission: backend.enabled() && backend.pendingSubmission('orders') }); },\n  draftOrder(cart = this.data.cart) {\n    var d = this.data;\n    return {\n      items: cart, total: store.cartTotal(cart), paymentMethod: d.paymentMethod, deliveryType: d.deliveryType, guestType: d.guestType,\n      room: d.deliveryType === 'room' ? bookingRules.normalizeRoom(getApp().globalData.room) : '',\n      ...(d.deliveryType === 'hall' && !d.reservationOrder ? { partySize: d.partySize } : {}),\n      contactName: d.contactName.trim(), phone: d.phone.trim(), remark: d.remark.trim(),\n      ...(d.reservationOrder ? { reservationId: d.reservationOrder.id } : {})\n    };\n  },\n  matchesCurrentDraft(order) {\n    var draft = this.draftOrder(store.getCart());\n    // The app may have gone to the background while waiting for a response.\n    if (!draft.room && draft.deliveryType === 'room') draft.room = order.room;\n    return matchesSubmission('orders', order, draft);\n  },\n  checkSubmission() {\n    if (this.data.submitting) return;\n    this.setData({ submitting: true });\n    backend.checkSubmission('orders').then((saved) => {\n      if (!saved) {\n        wx.showToast({ title: '上次订单未提交，可重新下单', icon: 'none' });\n        return;\n      }\n      var keepDraft = !this.matchesCurrentDraft(saved);\n      var summary = keepDraft ? '已找到上次提交的订单，当前购物车已保留。' : '已找回上次提交的订单。';\n      this.finishOrder(saved, summary, keepDraft);\n    }).catch((error) => wx.showToast({ title: error.message, icon: 'none' })).finally(() => {\n      this.setData({ submitting: false });\n      this.updateSubmission();\n    });\n  },\n  submitOrder() {\n    if (this.data.submitting || this.data.hasSoldOut || this.data.hasMissingVariant) return;\n    var d = this.data;\n    if (!d.cart.length) { wx.showToast({ title: '购物车是空的', icon: 'none' }); return; }\n    var order = this.draftOrder();\n    if (d.deliveryType === 'room' && !order.room) {\n      this.refreshRoom();\n      wx.showToast({ title: '请先扫描房间二维码', icon: 'none' });\n      return;\n    }\n    if (d.deliveryType === 'hall' && !d.reservationOrder) {\n      if (d.hallChecking || d.hallError) { this.refreshHall(); wx.showToast({ title: '请稍候确认大厅余位', icon: 'none' }); return; }\n      if (!d.hallAvailable) { hall.fullNotice(d.hallCode); return; }\n      if (!Number.isInteger(d.partySize) || d.partySize < 1 || d.partySize > bookingRules.hall.maxPartySize) {\n        this.setData({ partyOpen: true });\n        wx.showToast({ title: '请选择用餐人数，最多 8 位', icon: 'none' }); return;\n      }\n    }\n    if (!d.contactName.trim()) { wx.showToast({ title: '请填写联系人', icon: 'none' }); return; }\n    if (!normalizePhone(d.phone)) { wx.showToast({ title: '请填写 11 位手机号', icon: 'none' }); return; }\n    if (backend.enabled()) {\n      this.setData({ submitting: true });\n      backend.order(order).then((saved) => {\n        var keepDraft = !this.matchesCurrentDraft(saved);\n        this.finishOrder(saved, keepDraft ? '当前购物车已保留。' :\n          saved.reservationId ? '菜品已添加到预约，请线下结账。' : '餐厅已收到订单，请线下结账。', keepDraft);\n      }).catch((error) => {\n        if (error.code === 'hall_full' || error.code === 'hall_large_full') {\n          this.setData({ hallAvailable: false, hallCode: error.code }); hall.fullNotice(error.code);\n        }\n        else wx.showToast({ title: error.message, icon: 'none' });\n        availability.refresh(this);\n      }).finally(() => {\n        this.setData({ submitting: false });\n        this.updateSubmission();\n      });\n      return;\n    }\n    if (order.deliveryType === 'hall' && !order.reservationId) {\n      var seats = hall.offline('', '', order.partySize);\n      if (!seats.available) { this.setData({ hallAvailable: false, hallCode: seats.code }); hall.fullNotice(seats.code); return; }\n    }\n    var saved = store.createOrder({\n      ...order, id: store.makeId('YW'), createdAt: new Date().toISOString(), status: '待支付',\n      ...(d.reservationOrder ? { reservationDate: d.reservationOrder.date, reservationSlot: d.reservationOrder.slot } : {})\n    });\n    this.finishOrder(saved, '这是离线体验，订单仅保存在本机。');\n  },\n  finishOrder(order, summary, keepDraft) {\n    var app = getApp();\n    if (order.deliveryType === 'room' && app.globalData.room === order.room) app.clearRoom();\n    this.refreshRoom();\n    if (!keepDraft) {\n      store.clearCart();\n      this.setData({ cart: [], total: 0 });\n      app.globalData.deliveryType = order.deliveryType;\n      if (order.reservationId && app.globalData.reservationOrder?.id === order.reservationId) {\n        app.globalData.reservationOrder = null;\n      }\n    }\n    var showDetail = () => {\n      var openOrder = () => wx.navigateTo({ url: '/pages/order-detail/order-detail?id=' + encodeURIComponent(order.id) });\n      if (keepDraft) openOrder();\n      else wx.switchTab({ url: '/pages/index/index', success: openOrder, fail: openOrder });\n    };\n    if (order.paymentMethod === 'qr' && backend.enabled()) { showDetail(); return; }\n    wx.showModal({\n      title: keepDraft ? '已找到订单' : backend.enabled() ? '下单成功' : '已保存到本机',\n      content: '订单号 ' + order.id + '。' + summary,\n      showCancel: false,\n      confirmText: '查看订单',\n      success: function ({ confirm }) {\n        if (!confirm) {\n          if (!keepDraft) wx.switchTab({ url: '/pages/index/index' });\n          return;\n        }\n        showDetail();\n      }\n    });\n  }\n});\n","/pages/orders/orders.js":"var store = require('../../utils/store.js');\nvar backend = require('../../utils/backend.js');\nvar menuData = require('../../data/menu.js');\nvar roomRules = require('../../config/booking-rules.js');\nvar live = require('../../utils/live.js');\nPage({\n  data: {\n    orders: [], shownOrders: [], loading: false, loadError: '', connected: false, filter: 'all',\n    filters: [{ id: 'all', name: '全部' }, { id: 'room', name: '客房送餐' }, { id: 'hall', name: '大厅用餐' }, { id: 'reservation', name: '预约点餐' }]\n  },\n  onShow() { live.watch(this, () => this.refresh(true, true)); },\n  onHide() { live.stop(this); },\n  onUnload() { this.onHide(); },\n  refresh(fresh, silent) {\n    if (!backend.enabled()) {\n      this.applyOrders(store.getOrders());\n      this.setData({ loading: false, loadError: '' });\n      return;\n    }\n    if (this.pendingRefresh) return this.pendingRefresh.then(() => this.refresh(fresh, silent));\n    this.setData({ loading: silent !== true || !this.data.orders.length, loadError: '' });\n    this.pendingRefresh = backend.orders(!!fresh).then((orders) => this.applyOrders(orders)).catch((error) => {\n      this.setData({ loadError: error.message || '暂时无法连接餐厅服务' });\n    }).finally(() => { this.pendingRefresh = null; this.setData({ loading: false }); });\n    return this.pendingRefresh;\n  },\n  applyOrders(orders, filter = this.data.filter) {\n    var shownOrders = orders.filter((order) => {\n      var kind = order.reservationId ? 'reservation' : order.deliveryType;\n      return filter === 'all' || kind === filter;\n    }).map((order) => {\n      var date = new Date(order.createdAt);\n      var when = Number.isNaN(date.valueOf()) ? '' : roomRules.restaurantTime(date).slice(5,16).replace('T', ' ');\n      var previews = order.items.slice(0,3).map((line, index) => {\n        var dish = store.currentDish(menuData.findDish(line.id));\n        return { key: line.lineKey || line.id + '-' + index, image: dish ? dish.image : '' };\n      }).filter((entry) => entry.image);\n      return { ...order, when: when, previews: previews };\n    });\n    this.setData({ orders: orders, shownOrders: shownOrders, filter: filter, connected: backend.enabled() });\n  },\n  selectFilter(e) {\n    var value = e.currentTarget.dataset.id;\n    if (this.data.filters.some((item) => item.id === value)) this.applyOrders(this.data.orders, value);\n  },\n  goDetail(e) { wx.navigateTo({ url: '/pages/order-detail/order-detail?id=' + e.currentTarget.dataset.id }); }\n});\n","/pages/order-detail/order-detail.js":"var store = require('../../utils/store.js');\nvar pay = require('../../utils/pay.js');\nvar backend = require('../../utils/backend.js');\nvar live = require('../../utils/live.js');\nPage({\n  data: { order: null, connected: false, loading: false, loadError: '', qrImage: '', qrError: '' },\n  onLoad(options) {\n    this.orderId = options.id;\n  },\n  onShow() { live.watch(this, () => this.load(this.orderId, true)); },\n  onHide() { live.stop(this); },\n  onUnload() { this.onHide(); },\n  refreshStatus() { this.load(this.orderId); },\n  load(id, silent) {\n    if (!id) return;\n    if (!backend.enabled()) {\n      this.showOrder(store.getOrder(id));\n      return;\n    }\n    if (this.pendingRefresh) return this.pendingRefresh.then(() => this.load(id, silent));\n    this.setData({ loading: silent !== true || !this.data.order, loadError: '' });\n    this.pendingRefresh = backend.getOrder(id).then(async (order) => {\n      this.showOrder(order);\n      if (order.paymentMethod === 'qr' && order.paymentStatus !== '已支付') {\n        try {\n          var options = await backend.paymentOptions();\n          this.setData({ qrImage: options.qrPath ? backend.imageUrl(options.qrPath) : '',\n            qrError: options.qrPath ? '' : '餐厅收款码暂不可用，请联系员工。' });\n        } catch (error) { this.setData({ qrError: '暂时无法读取收款码，请刷新重试。' }); }\n      }\n    }).catch((error) => {\n      this.setData({ qrImage: '' });\n      this.setData({ loadError: error.message || '暂时无法连接餐厅服务' });\n    }).finally(() => { this.pendingRefresh = null; this.setData({ loading: false }); });\n    return this.pendingRefresh;\n  },\n  showOrder(order) {\n    if (!order) { this.setData({ order: null }); return; }\n    var items = order.items.map((item) => ({\n      ...item, lineKey: item.lineKey || item.id,\n      subtotal: item.subtotal === undefined ? Math.round(item.price * 100) * item.qty / 100 : item.subtotal\n    }));\n    this.setData({ order: { ...order, items: items, displayPhone: (order.phone || '').replace(/^(\\d{3})\\d{4}(\\d{4})$/, '$1****$2') },\n      connected: backend.enabled(), ...(order.paymentStatus === '已支付' ? { qrImage: '', qrError: '' } : {}) });\n    if (backend.enabled() && order.reservationId) pay.showReservationPaymentNotice(order);\n  },\n  qrLoadFailed() { this.setData({ qrImage: '', qrError: '收款码加载失败，请刷新重试。' }); }\n});\n","/pages/reserve/reserve.js":"var store = require('../../utils/store.js');\r\nvar backend = require('../../utils/backend.js');\r\nvar bookingRules = require('../../config/booking-rules.js');\r\nvar hall = require('../../utils/hall.js');\r\nvar live = require('../../utils/live.js');\r\nvar normalizePhone = require('../../utils/contact-phone.js').normalizePhone;\r\nvar matchesSubmission = require('../../utils/submission.js').matchesSubmission;\r\nvar admissionNotice = '非云径住客用餐需购买 68 元/人的虫洞计划门票入园体验。';\r\nfunction partyChoices(min, max) {\r\n  return Array.from({ length: max - min + 1 }, (_, i) => min + i);\r\n}\r\n\r\n\r\nfunction calendarMonth(year, month, today) {\r\n  var first = new Date(Date.UTC(year, month - 1, 1));\r\n  var start = first.toISOString().slice(0, 7);\r\n  var days = [];\r\n  var offset = (first.getUTCDay() + 6) % 7;\r\n  for (var blank = 0; blank < offset; blank++) days.push({ key: 'pad-' + blank });\r\n  var last = new Date(Date.UTC(year, month, 0)).getUTCDate();\r\n  for (var n = 1; n <= last; n++) {\r\n    var date = start + '-' + String(n).padStart(2, '0');\r\n    days.push({ key: date, date: date, day: n, past: date < today });\r\n  }\r\n  return {\r\n    year: first.getUTCFullYear(), month: first.getUTCMonth() + 1, days: days,\r\n    canBack: start > today.slice(0, 7), canForward: start < '9999-12'\r\n  };\r\n}\r\n\r\nPage({\r\n  data: {\r\n    type: 'hall', date: '', today: '', slots: bookingRules.slots, slotChoices: ['请选择时间段', ...bookingRules.slots],\r\n    slotIndex: 0, partySize: 0, name: '', phone: '', remark: '', connected: false, submitting: false, pendingSubmission: false,\r\n    minPartySize: bookingRules.minPartySize('hall'), maxPartySize: bookingRules.hall.maxPartySize, partyChoices: partyChoices(1, bookingRules.hall.maxPartySize),\r\n    hallFull: false, hallCode: '', hallLoading: false, hallError: '',\r\n    openField: '', calendar: {}, weekdays: ['一', '二', '三', '四', '五', '六', '日'],\r\n    contactOpen: false, suggestedRoomId: '', selectedRoomName: '',\r\n    navigation: [\r\n      { label: '首页', url: '/pages/index/index', icon: '/images/tabbar/home.png' },\r\n      { label: '点餐', url: '/pages/menu/menu', icon: '/images/tabbar/menu.png' },\r\n      { label: '订单', url: '/pages/orders/orders', icon: '/images/tabbar/orders.png' },\r\n      { label: '我的', url: '/pages/mine/mine', icon: '/images/tabbar/mine.png' }\r\n    ],\r\n    rooms: [], roomId: '', roomsLoading: false, roomError: ''\r\n  },\r\n  onLoad() { this.setData({ connected: backend.enabled() }); },\r\n  onShow() { this.updateSubmission(); live.watch(this, () => this.refreshAvailability(true)); },\r\n  onHide() { live.stop(this); this.roomQuery = (this.roomQuery || 0) + 1; },\r\n  onUnload() { this.onHide(); },\r\n  chooseSeating(e) {\r\n    var type = e.currentTarget.dataset.seating;\r\n    if (!['hall', 'private'].includes(type)) return;\r\n    var query = (this.seatingQuery || 0) + 1;\r\n    this.seatingQuery = query;\r\n    if (type === this.data.type) { if (type === 'hall' && this.data.hallFull) hall.fullNotice(this.data.hallCode); return; }\r\n    var minimum = bookingRules.minPartySize(type);\r\n    var maximum = type === 'private' && this.privateMaximum ? this.privateMaximum : bookingRules.maxPartySizeFor(type);\r\n    this.needsRoomSelection = false;\r\n    var change = () => this.setData({\r\n      openField: '', type: type, minPartySize: minimum, maxPartySize: maximum,\r\n      roomId: '', selectedRoomName: '', suggestedRoomId: '', hallFull: false, hallCode: '', hallError: '',\r\n      partyChoices: partyChoices(minimum, maximum),\r\n      partySize: this.data.partySize >= minimum && this.data.partySize <= maximum ? this.data.partySize : 0\r\n    }, () => this.refreshRooms());\r\n    var date = this.data.date;\r\n    var slot = this.data.slots[this.data.slotIndex - 1];\r\n    if (type !== 'hall' || !date || !slot) { change(); return; }\r\n    hall.check(date, slot).then(result => {\r\n      if (this.seatingQuery !== query || this.data.date !== date || this.data.slots[this.data.slotIndex - 1] !== slot) return;\r\n      if (!result.available) { this.setData({ hallFull: true, hallCode: result.code }); hall.fullNotice(result.code); return; }\r\n      change();\r\n    }).catch(error => wx.showToast({ title: error.message, icon: 'none' }));\r\n  },\r\n  toggleField(e) {\r\n    var field = e.currentTarget.dataset.field;\r\n    this.showField(this.data.openField === field ? '' : field);\r\n  },\r\n  showField(field) {\r\n    if (field !== 'date') { this.setData({ openField: field }); return; }\r\n    var today = bookingRules.restaurantTime().slice(0, 10);\r\n    var anchor = this.data.date > today ? this.data.date : today;\r\n    this.setData({\r\n      openField: field, today: today,\r\n      calendar: calendarMonth(Number(anchor.slice(0, 4)), Number(anchor.slice(5, 7)), today)\r\n    });\r\n  },\r\n  changeMonth(e) {\r\n    var cal = this.data.calendar;\r\n    var delta = Number(e.currentTarget.dataset.delta);\r\n    if ((delta === -1 && cal.canBack) || (delta === 1 && cal.canForward)) {\r\n      this.setData({ calendar: calendarMonth(cal.year, cal.month + delta, this.data.today) });\r\n    }\r\n  },\r\n  selectDate(e) {\r\n    var date = e.currentTarget.dataset.date;\r\n    if (!date || date < bookingRules.restaurantTime().slice(0, 10)) { this.showField('date'); return; }\r\n    this.setData({ openField: '' });\r\n    this.updateSlots(date);\r\n  },\r\n  onSlotChange(e) {\r\n    var index = this.data.slots.indexOf(e.currentTarget.dataset.slot) + 1;\r\n    if (!index) return;\r\n    this.needsRoomSelection = false;\r\n    if (bookingRules.isPastSlot(this.data.date, this.data.slots[index - 1])) {\r\n      this.refreshAvailability();\r\n      wx.showToast({ title: '预约时段已过，请重新选择', icon: 'none' });\r\n      return;\r\n    }\r\n    this.setData({ openField: '', slotIndex: index, roomId: '', selectedRoomName: '' }, () => this.refreshRooms());\r\n  },\r\n  onPartyChange(e) {\r\n    var size = Number(e.currentTarget.dataset.size);\r\n    if (size < this.data.minPartySize || size > this.data.maxPartySize) return;\r\n    this.needsRoomSelection = false;\r\n    this.setData({ openField: '', partySize: size, roomId: '', selectedRoomName: '' }, () => this.refreshRooms());\r\n  },\r\n  openTab(e) {\r\n    wx.switchTab({ url: e.currentTarget.dataset.url });\r\n  },\r\n  openContact() {\r\n    var d = this.data;\r\n    var hint = !d.date ? '请选择用餐日期' : !d.slots.length ? '当天已无可约时段，请改选日期' : !d.slotIndex ? '请选择预约时段' : !d.partySize ? '请选择用餐人数' : '';\r\n    if (!hint && d.type === 'private') {\r\n      if (d.roomsLoading) hint = '正在查询可约包厢';\r\n      else if (d.roomError || !d.roomId) hint = '请选择当前可约的包厢';\r\n    }\r\n    if (!hint && d.type === 'hall') {\r\n      if (d.hallFull) { hall.fullNotice(d.hallCode); return; }\r\n      if (d.hallLoading || d.hallError) { this.refreshRooms(); hint = '请稍候确认大厅余位'; }\r\n    }\r\n    if (hint) {\r\n      var field = !d.date || !d.slots.length ? 'date' : !d.slotIndex ? 'slot' : !d.partySize ? 'party' : '';\r\n      this.showField(field);\r\n      wx.showToast({ title: hint, icon: 'none' });\r\n    } else this.setData({ openField: '', contactOpen: true });\r\n  },\r\n  closeContact() {\r\n    if (!this.data.submitting) this.setData({ contactOpen: false });\r\n  },\r\n  updateSlots(date, silent) {\r\n    if (date !== this.data.date) this.needsRoomSelection = false;\r\n    var now = new Date();\r\n    var selected = this.data.slots[this.data.slotIndex - 1];\r\n    var slots = bookingRules.slots.filter((slot) => !bookingRules.isPastSlot(date, slot, now));\r\n    this.setData({\r\n      roomId: date === this.data.date ? this.data.roomId : '', date: date, today: bookingRules.restaurantTime(now).slice(0, 10),\r\n      slots: slots, slotChoices: ['请选择时间段', ...slots], slotIndex: slots.indexOf(selected) + 1\r\n    }, () => this.refreshRooms(silent));\r\n  },\r\n  refreshAvailability(silent) { this.updateSlots(this.data.date, silent); },\r\n  refreshRooms(silent) {\r\n    var request = (this.roomQuery || 0) + 1;\r\n    this.roomQuery = request;\r\n    var { type, date, slots, slotIndex, partySize } = this.data;\r\n    var slot = slots[slotIndex - 1];\r\n    if (type !== 'private') {\r\n      this.setData({ roomsLoading: false, roomError: '', hallLoading: silent === true ? this.data.hallLoading : !!(date && slot) });\r\n      if (!date || !slot) { this.setData({ hallFull: false, hallCode: '', hallError: '' }); return; }\r\n      hall.check(date, slot, partySize).then(result => {\r\n        if (this.roomQuery !== request) return;\r\n        this.setData({ hallFull: !result.available, hallCode: result.code || '', hallLoading: false, hallError: '' });\r\n        if (!result.available && silent !== true) hall.fullNotice(result.code);\r\n      }).catch(error => {\r\n        if (this.roomQuery === request) this.setData({ hallLoading: false, hallError: error.message });\r\n      });\r\n      return;\r\n    }\r\n    if (date && !slots.length) {\r\n      this.setData({ rooms: [], roomId: '', roomsLoading: false, roomError: '这一天已没有可预约的时段' });\r\n      return;\r\n    }\r\n    var apply = (rooms, maximum) => {\r\n      if (this.roomQuery !== request) return;\r\n      this.privateMaximum = maximum;\r\n      var available = rooms.filter((room) => !room.unavailable).sort((a, b) => a.capacity - b.capacity);\r\n      var suggested = partySize && (available.find((room) => room.recommended) || available[0]);\r\n      var previous = this.data.roomId;\r\n      var chosen = date && slot && partySize &&\r\n        (previous ? available.find(room => room.id === previous) : !this.needsRoomSelection && suggested);\r\n      if (previous && !chosen) this.needsRoomSelection = true;\r\n      var changes = {\r\n        rooms: rooms, suggestedRoomId: suggested ? suggested.id : '', roomId: chosen ? chosen.id : '',\r\n        selectedRoomName: chosen ? chosen.name : '', roomsLoading: false, roomError: '',\r\n        maxPartySize: maximum, partyChoices: partyChoices(this.data.minPartySize, maximum)\r\n      };\r\n      if (partySize > maximum) {\r\n        changes.partySize = 0;\r\n        this.setData(changes, () => this.refreshRooms());\r\n        return;\r\n      }\r\n      this.setData(changes);\r\n    };\r\n    if (!backend.enabled()) {\r\n      apply(bookingRules.privateRooms.map((room) => {\r\n        var unavailable = bookingRules.roomSizeHint(room, partySize) || (slot && !room.slots.includes(slot) ? '此时段不开放' : '');\r\n        return { ...room, unavailable, recommended: !unavailable && partySize >= room.recommendFrom };\r\n      }), bookingRules.maxPartySize);\r\n      return;\r\n    }\r\n    if (silent !== true || !this.data.rooms.length) this.setData({ roomsLoading: true, roomError: '' });\r\n    backend.privateRooms(date, slot, partySize || this.data.minPartySize).then((result) => apply(result.rooms, result.maxPartySize)).catch(() => {\r\n      if (this.roomQuery === request) this.setData({ roomsLoading: false, roomError: '暂时无法读取包厢，请刷新重试' });\r\n    });\r\n  },\r\n  selectRoom(e) {\r\n    if (this.data.roomsLoading || this.data.roomError || !this.data.date || !this.data.slotIndex) return;\r\n    var room = this.data.rooms.find((entry) => entry.id === e.currentTarget.dataset.id && !entry.unavailable);\r\n    if (room) {\r\n      this.needsRoomSelection = false;\r\n      this.setData({ roomId: room.id, selectedRoomName: room.name });\r\n    }\r\n  },\r\n  onNameInput(e) { this.setData({ name: e.detail.value }); },\r\n  onPhoneInput(e) { this.setData({ phone: e.detail.value }); },\r\n  onRemarkInput(e) { this.setData({ remark: e.detail.value }); },\r\n  updateSubmission() { this.setData({ pendingSubmission: backend.enabled() && backend.pendingSubmission('reservations') }); },\r\n  draftReservation() {\r\n    var d = this.data;\r\n    var room = d.type === 'private' ? d.rooms.find((entry) => entry.id === d.roomId && !entry.unavailable) : null;\r\n    return {\r\n      type: d.type, date: d.date, slot: d.slots[d.slotIndex - 1], partySize: d.partySize,\r\n      name: d.name.trim(), phone: d.phone.trim(), remark: d.remark.trim(),\r\n      ...(room ? { roomId: room.id, roomName: room.name } : {})\r\n    };\r\n  },\r\n  checkSubmission() {\r\n    if (this.data.submitting) return;\r\n    this.setData({ submitting: true });\r\n    backend.checkSubmission('reservations').then((saved) => {\r\n      if (!saved) {\r\n        wx.showToast({ title: '上次预约未提交，可重新预约', icon: 'none' });\r\n        return;\r\n      }\r\n      var keepDraft = !matchesSubmission('reservations', saved, this.draftReservation());\r\n      this.showSuccess(saved, keepDraft);\r\n    }).catch((error) => wx.showToast({ title: error.message, icon: 'none' })).finally(() => {\r\n      this.setData({ submitting: false });\r\n      this.updateSubmission();\r\n    });\r\n  },\r\n  submitReserve() {\r\n    if (this.data.submitting) return;\r\n    var d = this.data;\r\n    var minPartySize = bookingRules.minPartySize(d.type);\r\n    if (!Number.isInteger(d.partySize) || d.partySize < minPartySize || d.partySize > d.maxPartySize) {\r\n      wx.showToast({ title: '预约人数须为 ' + minPartySize + '–' + d.maxPartySize + ' 人', icon: 'none' });\r\n      return;\r\n    }\r\n    if (!d.date) { wx.showToast({ title: '请选择日期', icon: 'none' }); return; }\r\n    var draft = this.draftReservation();\r\n    if (!draft.slot) { wx.showToast({ title: '请选择预约时段', icon: 'none' }); return; }\r\n    if (bookingRules.isPastSlot(draft.date, draft.slot)) {\r\n      wx.showToast({ title: '预约时段已过，请重新选择', icon: 'none' });\r\n      this.refreshAvailability();\r\n      return;\r\n    }\r\n    if (d.type === 'private' && (d.roomsLoading || d.roomError || !draft.roomId)) {\r\n      wx.showToast({ title: '请选择当前可约的包厢', icon: 'none' });\r\n      return;\r\n    }\r\n    if (d.type === 'hall') {\r\n      if (d.hallFull) { hall.fullNotice(d.hallCode); return; }\r\n      if (d.hallLoading || d.hallError) { this.refreshRooms(); wx.showToast({ title: '请稍候确认大厅余位', icon: 'none' }); return; }\r\n    }\r\n    if (!d.name.trim()) { wx.showToast({ title: '请填写姓名', icon: 'none' }); return; }\r\n    if (!normalizePhone(d.phone)) { wx.showToast({ title: '请填写 11 位手机号', icon: 'none' }); return; }\r\n    if (backend.enabled()) {\r\n      this.setData({ submitting: true });\r\n      backend.reserve(draft).then((saved) => {\r\n        var keepDraft = !matchesSubmission('reservations', saved, this.draftReservation());\r\n        this.showSuccess(saved, keepDraft);\r\n      }).catch((error) => {\r\n        if (error.code === 'hall_full' || error.code === 'hall_large_full') {\r\n          this.setData({ contactOpen: false, hallCode: error.code, hallFull: true });\r\n          hall.fullNotice(error.code);\r\n          return;\r\n        }\r\n        wx.showToast({ title: error.message, icon: 'none' });\r\n        this.refreshAvailability();\r\n      }).finally(() => {\r\n        this.setData({ submitting: false });\r\n        this.updateSubmission();\r\n      });\r\n      return;\r\n    }\r\n    if (draft.type === 'hall') {\r\n      var seats = hall.offline(draft.date, draft.slot, draft.partySize);\r\n      if (!seats.available) { this.setData({ contactOpen: false, hallFull: true, hallCode: seats.code }); hall.fullNotice(seats.code); return; }\r\n    }\r\n    var r = { ...draft, id: store.makeId('RSV'), status: '待确认', createdAt: new Date().toISOString() };\r\n    store.saveReservation(r);\r\n    this.showSuccess(r);\r\n  },\r\n  showSuccess(reservation, keepDraft) {\r\n    this.setData(keepDraft ? { contactOpen: false } : { contactOpen: false, name: '', phone: '', remark: '' });\r\n    wx.showModal({\r\n      title: '选择点餐方式',\r\n      content: '您要到店点餐，还是现在打开菜单？',\r\n      cancelText: '到店点餐',\r\n      confirmText: '线上点餐',\r\n      success: (result) => {\r\n        if (result.confirm || result.cancel) this.showReservationReceipt(reservation, result.confirm, keepDraft);\r\n      }\r\n    });\r\n  },\r\n  showReservationReceipt(reservation, orderOnline, keepDraft) {\r\n    var details = ['预约号 ' + reservation.id, '状态 ' + reservation.status];\r\n    if (keepDraft) details.push('当前填写内容已保留。');\r\n    details.push('', '温馨提示', admissionNotice);\r\n    wx.showModal({\r\n      title: keepDraft ? '已找到预约' : '预约提交成功',\r\n      content: details.join('\\n'),\r\n      showCancel: false,\r\n      confirmText: orderOnline ? '去点餐' : '查看预约',\r\n      success: (result) => {\r\n        if (!result.confirm) return;\r\n        if (orderOnline) {\r\n          getApp().startReservationOrder(reservation);\r\n        } else {\r\n          wx.navigateTo({ url: '/pages/reservations/reservations' });\r\n        }\r\n      }\r\n    });\r\n  }\r\n});\r\n","/pages/reservations/reservations.js":"var backend = require('../../utils/backend.js');\nvar store = require('../../utils/store.js');\nvar pay = require('../../utils/pay.js');\nvar reservationOrders = require('../../utils/reservation-orders.js');\nvar live = require('../../utils/live.js');\n\nPage({\n  data: { reservations: [], loading: false, loadError: '' },\n  onShow() { live.watch(this, () => this.refresh(true, true)); },\n  onHide() { live.stop(this); },\n  onUnload() { this.onHide(); },\n  refresh(fresh, silent) {\n    if (!backend.enabled()) {\n      var saved = reservationOrders.withReservationOrders(store.getReservations(), store.getOrders());\n      this.showReservations(saved);\n      this.setData({ loading: false, loadError: '' });\n      return;\n    }\n    if (this.pendingRefresh) return this.pendingRefresh.then(() => this.refresh(fresh, silent));\n    this.setData({ loading: silent !== true || !this.data.reservations.length, loadError: '' });\n    this.pendingRefresh = backend.reservations(!!fresh).then((reservations) => {\n      this.showReservations(reservations);\n      reservations.some((booking) => pay.showReservationPaymentNotice(booking) ||\n        (booking.orders || []).some(pay.showReservationPaymentNotice));\n    }).catch((error) => {\n      this.setData({ loadError: error.message || '暂时无法连接餐厅服务' });\n    }).finally(() => { this.pendingRefresh = null; this.setData({ loading: false }); });\n    return this.pendingRefresh;\n  },\n  showReservations(bookings) {\n    this.setData({\n      reservations: bookings.map((booking) => ({ ...booking, canOrder: reservationOrders.canOrderForReservation(booking) }))\n    });\n  },\n  orderForBooking(e) {\n    var booking = this.data.reservations.find((entry) => entry.id === e.currentTarget.dataset.id);\n    getApp().startReservationOrder(booking);\n  },\n  openOrder(e) {\n    wx.navigateTo({ url: '/pages/order-detail/order-detail?id=' + encodeURIComponent(e.currentTarget.dataset.id) });\n  },\n  book() { wx.navigateTo({ url: '/pages/reserve/reserve' }); }\n});\n","/pages/mine/mine.js":"var store = require('../../utils/store.js');\nvar backend = require('../../utils/backend.js');\nvar live = require('../../utils/live.js');\nPage({\n  data: { room: '', orderCount: 0, resvCount: 0 },\n  onShow() { live.watch(this, () => this.refresh()); },\n  onHide() { live.stop(this); },\n  onUnload() { this.onHide(); },\n  refresh() {\n    var room = getApp().globalData.room;\n    if (backend.enabled()) {\n      this.setData({ room: room });\n      return Promise.all([backend.orders(true), backend.reservations(true)]).then(([orders, reservations]) => {\n        this.setData({ orderCount: orders.length, resvCount: reservations.length });\n      }).catch(() => {});\n    }\n    this.setData({\n      room: room,\n      orderCount: store.getOrders().length,\n      resvCount: store.getReservations().length\n    });\n  },\n  goOrders() { wx.switchTab({ url: '/pages/orders/orders' }); },\n  goReserve() { wx.navigateTo({ url: '/pages/reservations/reservations' }); },\n  goMenu() { wx.switchTab({ url: '/pages/menu/menu' }); },\n  showPrivacy() {\n    wx.showModal({ title: '用餐资料与隐私', showCancel: false, confirmText: '知道了',\n      content: '餐厅使用联系人、手机号和用餐信息处理订单和预约。员工登录后台后可查看完整手机号，用于联系到店或送餐。此设备保存访问本人订单的凭证，请妥善保管。离线体验记录保存在本机。如需更正或删除个人资料，请联系餐厅前台。' });\n  },\n  clearRoom() {\n    getApp().clearRoom();\n    this.setData({ room: '' });\n    wx.showToast({ title: '房号已清除', icon: 'success' });\n  }\n});\n"},"pages":{"pages/index/index":{"config":{"navigationBarTitleText":"牧心纪","navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black","usingComponents":{}},"template":"<view class=\"page visual-page celadon-page home-page\">\n  <!-- 外景照片来自携程「牧心纪·云径」展示页。https://dimg04.c-ctrip.com/images/1mc2312000eucwxjl521A_W_1280_853_R5_Q70.jpg -->\n  <view class=\"brand-panel\">\n    <image class=\"landscape\" src=\"/images/brand/hillside.jpg\" mode=\"aspectFill\" aria-label=\"牧心纪·云径外景\" />\n    <image class=\"celadon-decor cover-bamboo\" src=\"/images/decor/bamboo.png\" mode=\"aspectFit\" aria-hidden=\"true\" />\n    <view class=\"brand-heading\">\n      <view class=\"brand-place\">牧心纪 · 云径</view>\n      <view class=\"brand-title\">云雾餐厅</view>\n    </view>\n  </view>\n\n  <view class=\"home-gap\" aria-hidden=\"true\"></view>\n  <view class=\"home-actions\">\n    <view class=\"service-grid\">\n      <button class=\"service-tile service-room visual-dark\" bindtap=\"goRoomOrder\" hover-class=\"service-room-pressed\">\n        <view class=\"row space-between service-name\">\n          <text>客房送餐</text><text class=\"home-arrow\">›</text>\n        </view>\n        <view class=\"service-note\">{{room ? '送至 ' + room : '扫房间码点餐'}}</view>\n      </button>\n      <button class=\"service-tile service-hall visual-tone\" bindtap=\"goHallOrder\" hover-class=\"service-hall-pressed\">\n        <view class=\"row space-between service-name\">\n          <text>大厅用餐</text><text class=\"home-arrow\">›</text>\n        </view>\n        <view class=\"service-note\">每桌至多 8 位 · 到店安排</view>\n      </button>\n    </view>\n    <view class=\"row home-secondary\">\n      <button class=\"service-reserve\" bindtap=\"goReserve\" hover-class=\"service-link-pressed\">\n        <view class=\"row space-between\">\n          <text class=\"secondary-title\">散客预约</text><text class=\"home-arrow\">›</text>\n        </view>\n        <view class=\"secondary-note\">订大厅或包厢</view>\n      </button>\n      <button class=\"room-btn\" bindtap=\"scanRoom\" hover-class=\"service-link-pressed\">\n        <view class=\"row space-between\">\n          <text class=\"secondary-title\">{{room ? '重新扫码' : '扫一扫'}}</text><text class=\"home-arrow\">›</text>\n        </view>\n        <view class=\"secondary-note room-label\">{{room ? '送餐房号 ' + room : '绑定送餐房号'}}</view>\n      </button>\n    </view>\n  </view>\n\n  <view class=\"home-gap home-gap-featured\" wx:if=\"{{featured.length}}\" aria-hidden=\"true\"></view>\n  <view class=\"showcase\" wx:if=\"{{featured.length}}\">\n    <view class=\"row space-between showcase-header\">\n      <image class=\"celadon-decor home-bamboo\" src=\"/images/decor/bamboo.png\" mode=\"aspectFit\" aria-hidden=\"true\" />\n      <view class=\"showcase-heading\">\n        \n        <view class=\"title visual-title showcase-title\">特色主打</view>\n      </view>\n      <text class=\"showcase-count\" wx:if=\"{{featured.length > 1}}\">{{showcaseIndex + 1}} / {{featured.length}}</text>\n    </view>\n    <swiper class=\"showcase-carousel\" duration=\"260\" circular=\"{{featured.length > 1}}\" current=\"{{showcaseIndex}}\" bindchange=\"onShowcaseChange\">\n      <swiper-item class=\"showcase-slide\" wx:for=\"{{featured}}\" wx:key=\"id\" bindtap=\"goFeaturedDish\" data-id=\"{{item.id}}\">\n        <view class=\"showcase-image\" wx:if=\"{{item.image}}\">\n          <image wx:if=\"{{index === showcaseIndex || index === (showcaseIndex + 1) % featured.length || index === (showcaseIndex + featured.length - 1) % featured.length}}\" src=\"{{item.image}}\" mode=\"aspectFill\" class=\"hero-img-pic\" />\n        </view>\n        <view class=\"showcase-caption row space-between\">\n          <text class=\"showcase-name\">{{item.name}}</text>\n          <text class=\"visual-money showcase-price\">¥{{item.price}} / {{item.unit}}</text>\n        </view>\n      </swiper-item>\n    </swiper>\n  </view>\n  <view class=\"home-landscape\" aria-hidden=\"true\">\n    <image class=\"celadon-decor home-ridges\" src=\"/images/decor/ridges.png\" mode=\"scaleToFill\" aria-hidden=\"true\" />\n    <image class=\"celadon-decor home-mist\" src=\"/images/decor/mist.png\" mode=\"scaleToFill\" aria-hidden=\"true\" />\n  </view>\n</view>\n","style":".home-page {\n  display: flex;\n  flex-direction: column;\n  min-height: 100vh;\n  padding: 0 30rpx calc(28rpx + env(safe-area-inset-bottom));\n}\n.brand-panel, .home-actions, .showcase { flex: none; }\n/* 把可用的空余高度分给入口、特色菜和页脚。紧凑屏幕上的间距自然收起。 */\n.home-gap, .home-landscape { flex: 1 0 0px; }\n.home-gap { max-height: 46rpx; }\n.home-gap-featured { max-height: 54rpx; }\n.home-landscape { position: relative; min-height: 0; overflow: hidden; }\n.home-ridges { left: 0; right: 0; bottom: 0; width: 100%; height: 100%; max-height: 110rpx; opacity: .68; }\n.home-mist { left: 0; bottom: 0; width: 66%; height: 100%; max-height: 56rpx; opacity: .58; }\n\n.brand-panel {\n  position: relative;\n  height: 390rpx;\n  margin: 0 -30rpx;\n  overflow: hidden;\n  background: #264535;\n}\n.landscape { display: block; width: 100%; height: 100%; }\n.brand-heading {\n  position: absolute;\n  left: 32rpx;\n  bottom: 54rpx;\n  color: #fffdf8;\n  text-shadow: 0 2rpx 12rpx rgba(0, 0, 0, .58);\n  pointer-events: none;\n}\n.brand-place { margin-bottom: 8rpx; color: #f0dbaf; font-size: 25rpx; font-weight: 500; letter-spacing: 4rpx; }\n.brand-title { font-family: \"Songti SC\", \"Noto Serif CJK SC\", SimSun, serif; font-size: 60rpx; font-weight: 600; letter-spacing: 3rpx; line-height: 1.12; }\n\n.home-actions { position: relative; z-index: 1; margin-top: -26rpx; padding: 16rpx 16rpx 0; }\n.service-grid { display: flex; }\n.service-tile {\n  flex: 1;\n  min-width: 0;\n  width: auto;\n  min-height: 126rpx;\n  box-sizing: border-box;\n  margin: 0;\n  padding: 20rpx;\n  border-radius: 12rpx;\n  text-align: left;\n  line-height: 1.35;\n}\n.service-tile + .service-tile { margin-left: 12rpx; }\n.service-name { font-size: 32rpx; font-weight: 600; }\n.service-note { margin-top: 7rpx; font-size: 25rpx; }\n.service-room .service-note { color: #dfe7dc; }\n.service-hall .service-note { color: #536458; }\n.service-room .home-arrow { color: #e5c990; }\n.home-arrow { margin-left: 8rpx; font-size: 34rpx; font-weight: 400; line-height: 1; }\n.home-secondary { align-items: stretch; margin-top: 10rpx; }\n.service-reserve, .room-btn {\n  flex: 1;\n  min-width: 0;\n  width: auto;\n  min-height: 44px;\n  margin: 0;\n  padding: 15rpx 18rpx;\n  background: transparent;\n  border-radius: 0;\n  text-align: left;\n  color: #22392d;\n  line-height: 1.28;\n}\n.room-btn { border-left: 1rpx solid #d8ded1; }\n.secondary-title { font-size: 29rpx; font-weight: 600; }\n.secondary-note { margin-top: 6rpx; color: #536458; font-size: 24rpx; }\n.home-secondary .home-arrow { color: #775b35; }\n.home-page .service-room-pressed, .home-page .service-room:active { background: #20382b; }\n.home-page .service-hall-pressed, .home-page .service-hall:active { background: #d0dccb; }\n.service-link-pressed, .service-reserve:active, .room-btn:active { background: #e9eee4; }\n\n.showcase { margin-top: 34rpx; }\n.showcase-header { position: relative; min-height: 74rpx; margin-bottom: 15rpx; }\n.home-bamboo { right: 82rpx; top: -18rpx; width: 136rpx; height: 106rpx; opacity: .72; }\n.showcase-heading { position: relative; }\n.showcase-title::after {\n  content: \"\";\n  display: inline-block;\n  width: 33rpx;\n  height: 1rpx;\n  margin-left: 16rpx;\n  background: #c4a56e;\n  vertical-align: middle;\n}\n.showcase-title { margin-top: 2rpx; }\n.showcase-count { color: #536458; font-size: 25rpx; font-variant-numeric: tabular-nums; }\n.showcase-carousel { height: 444rpx; }\n.showcase-slide { height: 100%; overflow: hidden; border-radius: 12rpx; background: #fffdf9; }\n.showcase-image { width: 100%; height: 364rpx; overflow: hidden; background: #dde5d8; }\n.showcase-caption { min-height: 80rpx; box-sizing: border-box; gap: 12rpx; padding: 0 18rpx; }\n.showcase-name { min-width: 0; font-size: 31rpx; font-weight: 600; }\n.showcase-price { font-size: 25rpx; }\n\n.home-page { padding-left: 26rpx; padding-right: 26rpx; }\n.brand-panel { margin: 0 -18rpx; height: 414rpx; border-radius: 15rpx; }\n.brand-heading { bottom: 46rpx; }\n.cover-bamboo { width: 182rpx; height: 128rpx; top: -28rpx; right: -25rpx; opacity: .76; }\n.home-gap { max-height: 30rpx; }\n.home-gap-featured { max-height: 37rpx; }\n.home-actions { margin-top: 12rpx; padding: 0; }\n.service-tile { min-height: 132rpx; padding: 18rpx 20rpx; box-shadow: 0 6rpx 15rpx rgba(38,69,53,.10); }\n.celadon-page .service-hall { background: #fffdf9; }\n.home-secondary { margin-top: 14rpx; gap: 12rpx; }\n.service-reserve, .room-btn { min-height: 114rpx; padding: 17rpx 20rpx; border: 1rpx solid #e1e6db; border-radius: 12rpx; background: #fffdf9; box-shadow: 0 6rpx 15rpx rgba(38,69,53,.08); }\n.showcase { margin-top: 24rpx; }\n.showcase-header { min-height: 58rpx; }\n.home-bamboo { opacity: .56; }\n.showcase-carousel { height: 400rpx; }\n.showcase-image { height: 324rpx; }\n.showcase-caption { min-height: 76rpx; }\n"},"pages/menu/menu":{"config":{"navigationBarTitleText":"点餐","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page menu-page\">\n  <view class=\"review-search visual-panel\">\n    <text class=\"review-search-icon\" aria-hidden=\"true\"></text>\n    <input class=\"review-search-input\" value=\"{{keyword}}\" placeholder=\"搜索菜品，如“笋片”“牛肉”\" bindinput=\"onSearch\" />\n    <button class=\"review-search-clear\" wx:if=\"{{keyword}}\" bindtap=\"clearSearch\" aria-label=\"清除搜索\">×</button>\n  </view>\n  <view class=\"menu-intro\">\n    <view class=\"row space-between menu-heading\">\n      <image class=\"celadon-decor menu-ridge\" src=\"/images/decor/ridges.png\" mode=\"scaleToFill\" aria-hidden=\"true\" />\n      <view class=\"menu-heading-copy\">\n        <view class=\"title visual-title menu-title\">{{categoryName}}</view>\n      </view>\n      <text class=\"menu-count\">{{activeDishes.length}} 道</text>\n    </view>\n    <view class=\"menu-reservation row space-between\" wx:if=\"{{reservationOrder}}\">\n      <text>{{reservationOrder.date}} {{reservationOrder.slot}} 预约点餐</text>\n      <button size=\"mini\" class=\"mini-cart-link\" bindtap=\"leaveReservationOrder\">退出</button>\n    </view>\n  </view>\n  <view class=\"menu-columns\">\n    <scroll-view scroll-y=\"{{true}}\" class=\"cat-rail visual-tone\">\n      <view class=\"cat-list\">\n        <view wx:for=\"{{categories}}\" wx:key=\"id\" class=\"cat-item {{!keyword && activeCat === item.id ? 'cat-active' : ''}}\" bindtap=\"switchCat\" data-id=\"{{item.id}}\">{{item.name}}</view>\n      </view>\n    </scroll-view>\n    <scroll-view scroll-y=\"{{true}}\" scroll-into-view=\"menu-list-{{activeCat}}\" class=\"dish-list\">\n      <view id=\"menu-list-{{activeCat}}\"></view>\n      <view wx:for=\"{{activeDishes}}\" wx:key=\"id\" class=\"dish-row\" bindtap=\"goDish\" data-id=\"{{item.id}}\">\n        <view class=\"dish-img\" wx:if=\"{{item.image}}\">\n          <image src=\"{{item.image}}\" mode=\"aspectFill\" lazy-load=\"{{true}}\" class=\"dish-img-pic\" />\n        </view>\n        <view class=\"dish-copy\">\n          <view class=\"dish-name\">{{item.name}}</view>\n          <view class=\"row space-between dish-meta\">\n            <view class=\"dish-pricing\"><text class=\"visual-money\">¥{{item.price}}</text><text class=\"dish-unit\"> / {{item.unit}}</text></view>\n            <text class=\"soldout-tag\" wx:if=\"{{soldOut[item.id]}}\">已沽清</text>\n            <view class=\"row dish-stepper\" wx:else catchtap=\"stopTap\">\n              <button size=\"mini\" wx:if=\"{{item.variants && item.variants.length}}\" class=\"stepper-btn stepper-add variant-trigger\" bindtap=\"addQty\" data-id=\"{{item.id}}\">选规格</button>\n              <view wx:else class=\"row\">\n                <button size=\"mini\" class=\"stepper-btn menu-step\" wx:if=\"{{cartQty[item.id]}}\" bindtap=\"decQty\" data-id=\"{{item.id}}\"><text class=\"menu-step-icon\">−</text></button>\n                <view class=\"menu-qty\" wx:if=\"{{cartQty[item.id]}}\">{{cartQty[item.id]}}</view>\n                <button size=\"mini\" class=\"stepper-btn stepper-add menu-step\" bindtap=\"addQty\" data-id=\"{{item.id}}\"><text class=\"menu-step-icon\">+</text></button>\n              </view>\n            </view>\n          </view>\n        </view>\n      </view>\n      <view class=\"empty menu-empty\" wx:if=\"{{!activeDishes.length}}\">{{keyword ? '未找到相关菜品' : '该分类暂无菜品'}}</view>\n    </scroll-view>\n  </view>\n  <view class=\"bottom-bar menu-dock\">\n    <view class=\"menu-dock-surface visual-dark\">\n    <view class=\"mini-cart-panel\" wx:if=\"{{cartOpen}}\">\n      <view class=\"row space-between\">\n        <view class=\"mini-cart-title\">已选菜品</view>\n        <button size=\"mini\" class=\"mini-cart-link mini-cart-clear\" wx:if=\"{{cartCount}}\" bindtap=\"clearCart\">清空</button>\n      </view>\n      <scroll-view wx:if=\"{{cartCount}}\" scroll-y=\"{{true}}\" style=\"height:{{cartListHeight}}rpx;\" class=\"mini-cart-list\">\n        <view class=\"mini-cart-item row\" wx:for=\"{{cartItems}}\" wx:key=\"lineKey\">\n          <view class=\"mini-cart-item-name\">{{item.name}}{{item.variantName ? ' · ' + item.variantName : ''}}</view>\n          <view>× {{item.qty}}</view>\n          <view class=\"mini-cart-price\">¥{{item.subtotal}}</view>\n        </view>\n      </scroll-view>\n      <view class=\"menu-note mini-cart-empty\" wx:else>购物车是空的</view>\n    </view>\n    <view class=\"row space-between\">\n      <button class=\"mini-cart-trigger\" bindtap=\"toggleCart\">\n        <view class=\"menu-total\"><text class=\"visual-money\">¥{{cartTotal}}</text></view>\n        <view class=\"menu-note\">购物车 · {{cartCount}} 件</view>\n      </button>\n      <button class=\"primary-btn\" style=\"width:220rpx;\" bindtap=\"goCart\" disabled=\"{{!cartCount}}\">去结算</button>\n    </view>\n    </view>\n  </view>\n</view>\n","style":".menu-page { display: flex; flex-direction: column; height: 100vh; padding-bottom: calc(146rpx + env(safe-area-inset-bottom)); }\n.menu-intro { flex: none; padding-bottom: 16rpx; }\n.menu-heading { min-height: 88rpx; border-bottom: 1rpx solid #d8ded1; padding-bottom: 14rpx; }\n.menu-title { margin-top: 3rpx; }\n.menu-title::after {\n  content: \"\";\n  display: inline-block;\n  width: 33rpx;\n  height: 1rpx;\n  margin-left: 16rpx;\n  background: #c4a56e;\n  vertical-align: middle;\n}\n.menu-count { align-self: flex-end; padding-bottom: 4rpx; color: #536458; font-size: 25rpx; }\n.menu-note { color: #536458; font-size: 24rpx; }\n\n.menu-columns { display: flex; flex: 1; min-height: 0; }\n.cat-rail { flex: 0 0 140rpx; width: 140rpx; height: 100%; border-radius: 12rpx; }\n.cat-list { padding: 8rpx 6rpx; }\n.cat-item { display: flex; align-items: center; min-height: 74rpx; padding: 5rpx 11rpx; box-sizing: border-box; border-left: 4rpx solid transparent; color: #536458; font-size: 25rpx; }\n.cat-active { border-left-color: #c4a56e; border-radius: 7rpx; background: #264535; color: #fffdf9; font-weight: 600; }\n.dish-list { flex: 1; width: 0; height: 100%; margin-left: 12rpx; border-radius: 12rpx; background: #fffdf9; }\n.dish-row { display: flex; align-items: center; min-height: 128rpx; padding: 10rpx 24rpx 10rpx 12rpx; box-sizing: border-box; border-bottom: 1rpx solid #d8ded1; }\n.dish-row .dish-img { width: 104rpx; height: 110rpx; margin-right: 14rpx; border-radius: 9rpx; }\n.dish-copy { flex: 1; min-width: 0; }\n.dish-name { color: #22392d; font-size: 29rpx; font-weight: 600; line-height: 1.3; }\n.dish-meta { flex-wrap: wrap; gap: 0 6rpx; }\n.dish-pricing { padding: 7rpx 0; font-size: 29rpx; line-height: 1.25; white-space: nowrap; }\n.dish-unit { color: #536458; font-size: 22rpx; }\n.dish-stepper { flex: none; margin-left: auto; }\n.menu-step { width: 44px; height: 44px; background: transparent; border-radius: 8rpx; line-height: 44px; font-size: 0; }\n.menu-step-icon { display: inline-block; width: 30px; height: 30px; border-radius: 50%; background: #dde5d8; color: #22392d; vertical-align: middle; line-height: 30px; font-size: 19px; }\n.stepper-add .menu-step-icon { background: #264535; color: #fffdf9; }\n.menu-step:active .menu-step-icon { background: #cbd9ca; color: #22392d; }\n.variant-trigger { width: 108rpx; min-width: 44px; height: 44px; border-radius: 10rpx; background: #dde5d8; color: #22392d; line-height: 44px; font-size: 24rpx; }\n.menu-qty { min-width: 30rpx; text-align: center; font-size: 24rpx; font-weight: 600; }\n.menu-empty { padding: 48rpx 12rpx; font-size: 25rpx; }\n.menu-total { font-size: 39rpx; line-height: 1.2; }\n.menu-reservation { border-bottom: 1rpx solid #d8ded1; font-size: 24rpx; color: #22392d; }\n\n.menu-page .bottom-bar { border-top-color: #526b50; box-shadow: 0 -8rpx 24rpx rgba(38, 69, 53, .11); }\n.menu-page .bottom-bar .primary-btn { background: #c4a56e; color: #22392d; min-height: 44px; }\n.menu-page .bottom-bar .primary-btn[disabled] { background: #405b4b; color: #e5ede0; }\n.menu-total .visual-money, .mini-cart-price { color: #f0dbaf; }\n.menu-page .bottom-bar .menu-note { color: #e0e9db; }\n.mini-cart-trigger { margin: 0; padding: 0 12rpx 0 0; min-height: 44px; line-height: 1.35; background: transparent; color: #fffdf9; text-align: left; }\n.mini-cart-panel { padding-bottom: 14rpx; margin-bottom: 14rpx; border-bottom: 1rpx solid #667b68; }\n.mini-cart-title { color: #fffdf9; font-size: 28rpx; font-weight: 600; }\n.mini-cart-link { margin: 0; padding: 0 14rpx; line-height: 44px; background: transparent; font-size: 24rpx; color: #22392d; }\n.mini-cart-clear { color: #f0dbaf; }\n.mini-cart-list { width: 100%; }\n.mini-cart-item { box-sizing: border-box; height: 68rpx; border-top: 1rpx solid #667b68; gap: 12rpx; font-size: 25rpx; }\n.mini-cart-item-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.mini-cart-price { min-width: 74rpx; text-align: right; font-weight: 600; }\n.mini-cart-empty { padding: 14rpx 0; }\n\n.menu-page { padding-top: 16rpx; padding-left: 20rpx; padding-right: 20rpx; }\n.review-search { display: flex; align-items: center; flex: none; border: 0; border-radius: 40rpx; padding: 0 18rpx; min-height: 44px; }\n.review-search-icon { width: 20rpx; height: 20rpx; border: 2rpx solid #718579; border-radius: 50%; position: relative; flex: none; margin-right: 16rpx; }\n.review-search-icon::after { content: \"\"; position: absolute; right: -8rpx; bottom: -4rpx; height: 2rpx; width: 10rpx; background: #718579; transform: rotate(45deg); }\n.review-search .review-search-input { flex: 1; min-width: 0; background: transparent; padding: 0 5rpx; border: 0; height: 44px; color: #22392d; }\n.review-search-clear { flex: none; background: transparent; color: #536458; font-size: 35rpx; margin: 0; padding: 0 12rpx; min-height: 44px; line-height: 44px; }\n.menu-intro { padding-top: 12rpx; padding-bottom: 8rpx; }\n.menu-heading { position: relative; overflow: hidden; min-height: 85rpx; padding: 0 10rpx; border: 0; }\n.menu-heading-copy, .menu-count { position: relative; z-index: 1; }\n.menu-ridge { width: 61%; height: 100%; right: 0; bottom: 0; opacity: .58; }\n.menu-title::after { display: none; }\n.cat-rail.visual-tone { background: transparent; }\n.cat-active { border-left-color: #c4a56e; }\n.dish-list { margin-left: 8rpx; }\n.menu-page .menu-dock { background: #f1f3ed; border: 0; box-shadow: none; padding: 10rpx 20rpx calc(12rpx + env(safe-area-inset-bottom)); }\n.menu-dock-surface { padding: 8rpx 10rpx 8rpx 22rpx; border-radius: 38rpx; }\n.menu-page .bottom-bar .primary-btn { border-radius: 32rpx; }\n.menu-total { font-size: 34rpx; }\n"},"pages/dish/dish":{"config":{"navigationBarTitleText":"菜品详情","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page detail-page\">\n  <view class=\"visual-panel dish-detail\" wx:if=\"{{dish}}\">\n    <view class=\"hero-img {{dish.imageSquare && dish.image === '/images/dishes/' + dish.id + '.jpg' ? 'hero-img-square' : ''}}\" wx:if=\"{{dish.image}}\">\n      <image src=\"{{dish.image}}\" mode=\"aspectFill\" class=\"hero-img-pic\" />\n    </view>\n    <view class=\"dish-detail-copy\">\n      <view class=\"row space-between\">\n        <text class=\"eyebrow\">{{categoryName}}</text>\n        <text class=\"eyebrow\" wx:if=\"{{dish.image === '/images/dishes/' + dish.id + '.jpg'}}\">示意图</text>\n      </view>\n      <view class=\"row space-between detail-title-row\">\n        <view class=\"title visual-title dish-detail-name\">{{dish.name}}</view>\n        <view class=\"detail-price\"><text class=\"visual-money dish-detail-price\">¥{{dish.price}}</text><text class=\"subtitle\"> / {{dish.unit}}</text></view>\n      </view>\n      <text class=\"soldout-tag\" wx:if=\"{{soldOut[dish.id]}}\">已沽清</text>\n    </view>\n  </view>\n  <view class=\"empty\" wx:else>未找到该菜品</view>\n\n  <view class=\"visual-panel variant-panel\" wx:if=\"{{dish && dish.variants && dish.variants.length}}\">\n    <view class=\"title variant-title\">选择规格</view>\n    <view class=\"variant-list\">\n      <button size=\"mini\" class=\"variant-choice {{variantId === item.id ? 'variant-selected' : ''}}\" wx:for=\"{{dish.variants}}\" wx:key=\"id\" bindtap=\"selectVariant\" data-id=\"{{item.id}}\">{{item.name}}</button>\n    </view>\n  </view>\n\n  <view class=\"visual-panel preparation-card\" wx:if=\"{{showPreparation && preparation}}\">\n    <view class=\"row space-between preparation-header\">\n      <image class=\"celadon-decor detail-bamboo\" src=\"/images/decor/bamboo.png\" mode=\"aspectFit\" aria-hidden=\"true\" />\n      <view>\n        <view class=\"title preparation-title\">{{preparation.serving ? '供应说明' : '菜品做法'}}</view>\n      </view>\n    </view>\n\n    <view class=\"preparation-note\" wx:if=\"{{!preparation.confirmed}}\">做法供参考，用料以厨房当天出品为准。</view>\n    <view class=\"preparation-note\" wx:if=\"{{preparation.confirmed && preparation.note}}\">{{preparation.note}}</view>\n\n    <view class=\"preparation-ingredients\" wx:if=\"{{preparation.ingredients}}\">\n      <view class=\"preparation-label\">主要用料</view>\n      <view>{{preparation.ingredients}}</view>\n    </view>\n\n    <view class=\"preparation-steps\">\n      <view class=\"preparation-label\">{{preparation.serving ? '供应方式' : '烹调步骤'}}</view>\n      <view class=\"preparation-step\" wx:for=\"{{preparation.steps}}\" wx:for-item=\"step\" wx:key=\"*this\">\n        <text class=\"preparation-number\">{{index + 1}}</text>\n        <text class=\"preparation-text\">{{step}}</text>\n      </view>\n    </view>\n  </view>\n  <view class=\"card muted\" wx:if=\"{{showPreparation && !preparation}}\">做法待补充</view>\n\n  <view class=\"bottom-bar detail-dock\" wx:if=\"{{dish}}\">\n    <view class=\"row space-between\">\n      <view class=\"row\" wx:if=\"{{!soldOut[dish.id]}}\">\n        <button size=\"mini\" class=\"stepper-btn\" bindtap=\"decQty\">-</button>\n        <view style=\"width:64rpx;text-align:center;\">{{qty}}</view>\n        <button size=\"mini\" class=\"stepper-btn stepper-add\" bindtap=\"addQty\">+</button>\n      </view>\n      <view class=\"muted\" wx:else>暂不可点</view>\n      <button class=\"primary-btn\" style=\"width:280rpx;\" bindtap=\"addToCart\" disabled=\"{{soldOut[dish.id] || (dish.variants && dish.variants.length && !variantId)}}\">{{soldOut[dish.id] ? '已沽清' : (dish.variants && dish.variants.length && !variantId ? '请先选择规格' : '加入购物车')}}</button>\n    </view>\n  </view>\n</view>\n","style":".dish-detail { padding: 16rpx; }\n.dish-detail-copy { padding: 24rpx 16rpx 18rpx; }\n.dish-detail-name { font-size: 42rpx; margin: 7rpx 0 12rpx; }\n.dish-detail-price { font-size: 40rpx; }\n.variant-title { font-size: 30rpx; margin-bottom: 16rpx; }\n.variant-list { display: flex; flex-wrap: wrap; }\n.variant-choice { margin: 0 12rpx 8rpx 0; padding: 0 32rpx; line-height: 66rpx; border-radius: 999rpx; font-size: 26rpx; background: #E6EBE0; color: #31483C; }\n.variant-choice.variant-selected { background: #31483C; color: #FFFCF6; }\n.preparation-header { margin-bottom: 16rpx; }\n.preparation-title { margin-top: 6rpx; }\n.preparation-note { color: #586554; font-size: 24rpx; margin-top: 8rpx; }\n.preparation-ingredients {\n  margin-top: 24rpx;\n  padding: 20rpx 22rpx;\n  border-left: 4rpx solid #98a58e;\n  background: #E6EBE0;\n  color: #3A4F42;\n  line-height: 1.55;\n}\n.preparation-label { color: #31483C; font-size: 26rpx; font-weight: 700; margin-bottom: 4rpx; }\n.preparation-steps { margin-top: 24rpx; }\n.preparation-step { display: flex; align-items: flex-start; margin-top: 16rpx; }\n.preparation-number {\n  flex: none;\n  width: 42rpx;\n  height: 42rpx;\n  line-height: 42rpx;\n  text-align: center;\n  margin-right: 16rpx;\n  border-radius: 50%;\n  background: #e6eadd;\n  color: #40533e;\n  font-size: 24rpx;\n  font-weight: 600;\n}\n.preparation-text { flex: 1; min-width: 0; line-height: 1.6; }\n.hero-img-square { position: relative; height: 0; padding-top: 100%; }\n.hero-img-square .hero-img-pic { position: absolute; top: 0; left: 0; }\n\n.detail-page { padding: 20rpx 22rpx calc(180rpx + env(safe-area-inset-bottom)); }\n.dish-detail { padding: 0; overflow: hidden; margin-bottom: 14rpx; }\n.dish-detail .hero-img { border-radius: 0; }\n.dish-detail-copy { padding: 22rpx; }\n.detail-title-row { align-items: baseline; gap: 15rpx; }\n.detail-price { flex: none; white-space: nowrap; }\n.dish-detail-name { font-size: 38rpx; min-width: 0; }\n.dish-detail-price { font-size: 35rpx; }\n.variant-panel, .preparation-card { padding: 21rpx 22rpx; margin-bottom: 14rpx; }\n.variant-choice { min-height: 44px; line-height: 44px; border: 1rpx solid #d8ded1; border-radius: 10rpx; background: #e7ede3; color: #22392d; }\n.variant-choice.variant-selected { border-color: #c4a56e; background: #efe5cc; color: #624629; }\n.preparation-header { position: relative; padding-right: 135rpx; }\n.detail-bamboo { top: -20rpx; right: 0; width: 145rpx; height: 101rpx; opacity: .54; }\n.preparation-ingredients { background: #e7ede3; }\n.detail-dock { background: #fffdf9; border-top-color: #d8ded1; }\n.detail-dock .primary-btn { background: #264535; border-radius: 34rpx; min-height: 44px; }\n.detail-dock .primary-btn[disabled] { background: #dce5d9; color: #536458; }\n"},"pages/cart/cart":{"config":{"navigationBarTitleText":"我的购物车","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page cart-page\">\n  <view class=\"visual-panel cart-method\">\n    <view class=\"cart-label\">用餐方式</view>\n    <view class=\"row cart-options\" wx:if=\"{{reservationOrder}}\">\n      <text class=\"cart-option cart-option-picked\">预约点餐</text>\n      <text class=\"cart-booking\">{{reservationOrder.date}} {{reservationOrder.slot}}</text>\n    </view>\n    <view class=\"row cart-options\" wx:else>\n      <button class=\"cart-option {{deliveryType === 'room' ? 'cart-option-picked' : ''}}\" bindtap=\"chooseDelivery\" data-type=\"room\" disabled=\"{{!canChooseRoom}}\">客房送餐</button>\n      <button class=\"cart-option {{deliveryType === 'hall' ? 'cart-option-picked' : ''}}\" bindtap=\"chooseDelivery\" data-type=\"hall\">大厅用餐</button>\n      <button class=\"cart-option cart-option-pickup\" disabled=\"{{true}}\"><view>自提</view><view class=\"pickup-note\">暂未开放</view></button>\n    </view>\n  </view>\n  <view class=\"card soldout-notice\" wx:if=\"{{hasSoldOut}}\">请移除暂不可点的菜品后再下单。</view>\n  <view class=\"card soldout-notice\" wx:if=\"{{hasMissingVariant}}\">有商品尚未选择规格，请移除后重新添加。</view>\n  <view class=\"visual-panel cart-list\" wx:if=\"{{cart.length}}\">\n    <view wx:for=\"{{cart}}\" wx:key=\"lineKey\" class=\"row cart-line\">\n      <text class=\"cart-picked {{soldOut[item.id] || item.requiresVariant ? 'cart-picked-unavailable' : ''}}\" aria-hidden=\"true\">{{soldOut[item.id] || item.requiresVariant ? '!' : '✓'}}</text>\n      <image class=\"cart-thumb\" wx:if=\"{{item.image}}\" src=\"{{item.image}}\" mode=\"aspectFill\" />\n      <view class=\"cart-copy\">\n        <view class=\"cart-name\">{{item.name}}</view>\n        <view class=\"cart-variant\" wx:if=\"{{item.variantName}}\">{{item.variantName}}</view>\n        <view class=\"row space-between cart-meta\">\n          <view class=\"visual-money cart-price\">¥{{item.price}} / {{item.unit}}</view>\n          <view class=\"row soldout-cart-actions\" wx:if=\"{{soldOut[item.id] || item.requiresVariant}}\">\n            <text class=\"soldout-tag\">{{soldOut[item.id] || '未选规格'}}</text>\n            <button class=\"soldout-remove\" bindtap=\"removeItem\" data-id=\"{{item.lineKey}}\">移除</button>\n          </view>\n          <view class=\"row cart-quantity\" wx:else>\n            <button size=\"mini\" class=\"stepper-btn cart-step\" bindtap=\"decQty\" data-id=\"{{item.lineKey}}\"><text class=\"cart-step-icon\">−</text></button>\n            <text class=\"cart-qty\">{{item.qty}}</text>\n            <button size=\"mini\" class=\"stepper-btn cart-step\" bindtap=\"addQty\" data-id=\"{{item.lineKey}}\"><text class=\"cart-step-icon\">+</text></button>\n          </view>\n        </view>\n      </view>\n    </view>\n  </view>\n  <view class=\"visual-panel cart-empty\" wx:if=\"{{!cart.length}}\">购物车是空的，去点餐页选菜吧</view>\n  <view class=\"bottom-bar cart-dock\" wx:if=\"{{cart.length}}\">\n    <view class=\"row cart-utility\">\n      <image class=\"celadon-decor cart-ridge\" src=\"/images/decor/ridges.png\" mode=\"scaleToFill\" aria-hidden=\"true\" />\n      <button size=\"mini\" class=\"cart-clear\" bindtap=\"clearAll\">清空购物车</button>\n    </view>\n    <view class=\"visual-panel row space-between cart-summary\">\n      <view class=\"row cart-total-group\"><text>合计</text><text class=\"visual-money cart-total\">¥{{total}}</text></view>\n      <button class=\"primary-btn\" style=\"width:220rpx;\" bindtap=\"goConfirm\" disabled=\"{{hasSoldOut || hasMissingVariant}}\">去结算</button>\n    </view>\n  </view>\n</view>\n","style":".cart-page { padding: 20rpx 22rpx calc(260rpx + env(safe-area-inset-bottom)); }\n.cart-label { font-weight: 600; font-size: 28rpx; }\n.cart-method { margin-bottom: 17rpx; padding: 21rpx 16rpx 16rpx; border-color: #e6e9df; }\n.cart-options { gap: 10rpx; margin-top: 15rpx; }\n.cart-option {\n  flex: 1; min-width: 0; min-height: 44px; margin: 0; padding: 10rpx 4rpx;\n  display: flex; flex-direction: column; justify-content: center; align-items: center;\n  border-radius: 12rpx; background: #eff2eb; color: #22392d; font-size: 25rpx; font-weight: 600; line-height: 1.25; text-align: center;\n}\n.cart-option-picked { background: #264535; color: #fffdf9; }\n.cart-option[disabled] { color: #536458; }\n.pickup-note { font-size: 20rpx; font-weight: 400; margin-top: 2rpx; }\n.cart-booking { flex: 1.8; color: #536458; font-size: 24rpx; }\n.cart-list { padding: 0 12rpx; }\n.cart-line { gap: 12rpx; min-height: 135rpx; padding: 13rpx 4rpx; box-sizing: border-box; }\n.cart-line + .cart-line { border-top: 1rpx solid #d8ded1; }\n.cart-picked { flex: none; width: 36rpx; height: 36rpx; border-radius: 50%; line-height: 36rpx; text-align: center; font-size: 23rpx; background: #264535; color: #fffdf9; }\n.cart-picked-unavailable { color: #7b4d2d; background: #efe4ce; }\n.cart-thumb { flex: none; width: 105rpx; height: 105rpx; border-radius: 11rpx; }\n.cart-copy { flex: 1; min-width: 0; }\n.cart-name { color: #22392d; font-size: 29rpx; font-weight: 600; line-height: 1.3; }\n.cart-variant { color: #536458; font-size: 23rpx; }\n.cart-meta { gap: 5rpx; flex-wrap: wrap; }\n.cart-price { font-size: 25rpx; }\n.cart-quantity { margin-left: auto; }\n.cart-step { width: 44px; height: 44px; min-width: 44px; min-height: 44px; line-height: 44px; background: transparent; font-size: 0; }\n.cart-step-icon { display: inline-block; vertical-align: middle; width: 28px; height: 28px; line-height: 28px; text-align: center; border-radius: 50%; background: #e8eee5; color: #22392d; font-size: 18px; }\n.cart-qty { min-width: 26rpx; text-align: center; font-size: 26rpx; font-variant-numeric: tabular-nums; }\n.cart-empty { padding: 52rpx 20rpx; text-align: center; color: #536458; }\n.cart-dock { background: #f1f3ed; border: 0; padding: 0 22rpx calc(40rpx + env(safe-area-inset-bottom)); }\n.cart-utility { position: relative; min-height: 92rpx; justify-content: flex-end; align-items: flex-end; }\n.cart-ridge { bottom: 2rpx; left: 0; width: 100%; height: 92rpx; opacity: .55; }\n.cart-clear { position: relative; min-height: 44px; line-height: 44px; margin: 0; padding: 0 9rpx; background: transparent; color: #536458; font-size: 24rpx; }\n.cart-summary { padding: 14rpx 17rpx; }\n.cart-summary .primary-btn { background: #264535; border-radius: 40rpx; min-height: 44px; }\n.cart-summary .primary-btn[disabled] { background: #dce5d9; color: #536458; }\n.cart-total-group { gap: 14rpx; }\n.cart-total { font-size: 38rpx; }\n"},"pages/order-confirm/order-confirm":{"config":{"navigationBarTitleText":"确认订单","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page\">\n  <view class=\"card\">\n    <view class=\"title\">已选菜品</view>\n    <view wx:for=\"{{cart}}\" wx:key=\"lineKey\" class=\"row space-between\" style=\"margin-top:12rpx;\">\n      <view>{{item.name}}{{item.variantName ? ' · ' + item.variantName : ''}} × {{item.qty}} <text class=\"soldout-tag\" wx:if=\"{{soldOut[item.id]}}\">{{soldOut[item.id]}}</text></view><view>¥{{item.subtotal}}</view>\n    </view>\n    <view class=\"row space-between\" style=\"margin-top:16rpx;\"><view>合计</view><view class=\"price\" style=\"font-size:34rpx;\">¥{{total}}</view></view>\n  </view>\n\n  <view class=\"card\" wx:if=\"{{reservationOrder}}\">\n    <view class=\"title\">预约点餐</view>\n    <view class=\"subtitle\">{{reservationOrder.date}} · {{reservationOrder.slot}}{{reservationOrder.roomName ? ' · ' + reservationOrder.roomName : ''}}</view>\n    <view class=\"subtitle\">预约号 {{reservationOrder.id}}</view>\n  </view>\n  <view class=\"card\" wx:else>\n    <view>用餐方式</view>\n    <radio-group bindchange=\"onDeliveryChange\" style=\"margin-top:12rpx;\">\n      <label style=\"display:block;margin-bottom:12rpx;\"><radio color=\"#31483C\" value=\"room\" checked=\"{{deliveryType==='room'}}\" disabled=\"{{guestType==='walkin'}}\" /> 客房送餐</label>\n      <label style=\"display:block;\"><radio color=\"#31483C\" value=\"hall\" checked=\"{{deliveryType==='hall'}}\" /> 大厅用餐</label>\n    </radio-group>\n    <view class=\"muted\" wx:if=\"{{guestType==='walkin'}}\">散客不能送餐到客房，请选择大厅用餐或去预约。</view>\n  </view>\n\n  <view class=\"card row space-between\" wx:if=\"{{deliveryType==='room'}}\">\n    <view class=\"scan-room-copy\">\n      <view class=\"scan-room-label\">送餐房号<text class=\"scan-room-number\" wx:if=\"{{room}}\">{{room}}</text></view>\n      <view class=\"subtitle\" wx:if=\"{{!room}}\">扫房间码填写</view>\n    </view>\n    <button class=\"scan-room-btn\" bindtap=\"scanRoom\" disabled=\"{{submitting}}\"><view class=\"scan-room-btn-label\">{{room ? '重新扫码' : '扫码填写'}}</view></button>\n  </view>\n  <view class=\"card\" wx:if=\"{{deliveryType==='hall' && !reservationOrder}}\">\n    <view class=\"scan-room-label\">大厅用餐</view>\n    <view class=\"subtitle\">座位由餐厅工作人员安排，每桌最多 8 位。</view>\n    <button class=\"hall-party-trigger\" bindtap=\"toggleParty\"><text>用餐人数</text><text>{{partySize ? partySize + ' 位' : '请选择人数'}} ›</text></button>\n    <view wx:if=\"{{partyOpen}}\" class=\"hall-party-grid\">\n      <button size=\"mini\" wx:for=\"{{partyChoices}}\" wx:key=\"*this\" class=\"hall-party-choice {{partySize === item ? 'hall-party-picked' : ''}}\" bindtap=\"selectParty\" data-size=\"{{item}}\">{{item}} 位</button>\n    </view>\n    <view class=\"subtitle\" wx:if=\"{{hallChecking}}\">正在确认大厅余位…</view>\n    <view class=\"subtitle\" wx:elif=\"{{hallError}}\">{{hallError}}<button size=\"mini\" class=\"hall-retry\" bindtap=\"refreshHall\">重试</button></view>\n    <view class=\"subtitle\" wx:elif=\"{{!hallAvailable}}\">{{hallCode === 'hall_large_full' ? '本餐段的 7–8 人桌已满。' : '大厅桌位已满。'}}<button size=\"mini\" class=\"hall-retry\" bindtap=\"refreshHall\">刷新余位</button></view>\n  </view>\n\n  <view class=\"card\">\n    <view wx:if=\"{{reservationOrder}}\">预约联系人 {{contactName}}{{bookingHasPhone ? ' · ' + phone : ''}}</view>\n    <view wx:else>\n      <view>联系人</view>\n      <input placeholder=\"姓名\" value=\"{{contactName}}\" bindinput=\"onNameInput\" style=\"margin-top:12rpx;\" />\n    </view>\n    <view wx:if=\"{{!bookingHasPhone}}\">\n      <view style=\"margin-top:12rpx;\">手机号（必填）</view>\n      <input type=\"number\" placeholder=\"11 位手机号\" value=\"{{phone}}\" bindinput=\"onPhoneInput\" maxlength=\"11\" style=\"margin-top:12rpx;\" />\n    </view>\n    <view style=\"margin-top:12rpx;\">备注</view>\n    <textarea placeholder=\"例如：少辣、不要香菜\" value=\"{{remark}}\" bindinput=\"onRemarkInput\" style=\"margin-top:12rpx;\" />\n  </view>\n\n  <view class=\"card\">\n    <view class=\"title\">支付方式</view>\n    <radio-group bindchange=\"onPaymentChange\" style=\"margin-top:12rpx;\">\n      <label style=\"display:block;margin-bottom:16rpx;\"><radio color=\"#31483C\" value=\"offline\" checked=\"{{paymentMethod==='offline'}}\" /> 线下支付</label>\n      <label style=\"display:block;\"><radio color=\"#31483C\" value=\"qr\" checked=\"{{paymentMethod==='qr'}}\" disabled=\"{{!qrAvailable}}\" /> 线上扫码支付</label>\n    </radio-group>\n    <view class=\"subtitle\">{{qrAvailable ? '扫码支付由餐厅核实到账。' : '扫码收款暂未开放，可线下结账。'}}</view>\n  </view>\n  <view class=\"card soldout-notice\" wx:if=\"{{hasSoldOut || hasMissingVariant}}\">\n    <view>{{hasSoldOut ? '有菜品暂不可点，请返回购物车调整。' : '有商品未选择规格，请返回购物车调整。'}}</view>\n    <button class=\"ghost-btn\" style=\"margin-top:16rpx;\" bindtap=\"backToCart\">返回购物车</button>\n  </view>\n  <view class=\"card\" wx:if=\"{{pendingSubmission}}\">\n    <view class=\"subtitle\">上次订单结果待确认。查询后可查看原单，或重新核对后下单。</view>\n    <button class=\"primary-btn\" bindtap=\"checkSubmission\" loading=\"{{submitting}}\" disabled=\"{{submitting}}\">查询提交结果</button>\n  </view>\n  <button class=\"primary-btn\" wx:else bindtap=\"submitOrder\" loading=\"{{submitting}}\" disabled=\"{{submitting || !cart.length || hasSoldOut || hasMissingVariant || (deliveryType==='room' && !room)}}\">提交订单（¥{{total}}）</button>\n  <view class=\"muted\" style=\"margin-top:12rpx;\">联系人、手机号和送餐信息用于本次接单、送餐与联系。</view>\n</view>\n","style":".scan-room-copy { flex: 1; min-width: 0; }\n.scan-room-label { font-weight: 600; }\n.scan-room-number { margin-left: 8rpx; }\n.scan-room-btn {\n  display: flex;\n  align-items: center;\n  justify-content: center;\n  box-sizing: border-box;\n  flex: none;\n  width: 200rpx;\n  min-width: 0;\n  margin: 0 0 0 16rpx;\n  padding: 0 24rpx;\n  height: 44px;\n  min-height: 44px;\n  line-height: 1;\n  border-radius: 999rpx;\n  background: #E6EBE0;\n  color: #31483C;\n  font-size: 26rpx;\n  font-weight: 600;\n  white-space: nowrap;\n}\n.scan-room-btn[disabled] { opacity: .6; }\n.scan-room-btn-label { display: flex; align-items: center; justify-content: center; height: 44px; line-height: 1.4; }\n\n.celadon-page .scan-room-btn { color: #22392d; background: #dde5d8; min-height: 44px; }\n.hall-party-trigger { display: flex; align-items: center; justify-content: space-between; width: 100%; margin: 12rpx 0 0; padding: 0; min-height: 44px; border-radius: 0; background: transparent; font-size: 28rpx; color: #22392d; }\n.hall-party-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8rpx; margin-top: 12rpx; }\n.hall-party-choice { width: 100%; margin: 0; padding: 0; height: 44px; line-height: 44px; color: #294b35; background: #eff2e9; font-size: 27rpx; }\n.hall-party-picked { color: #fffdf8; background: #294b35; }\n.hall-retry { margin-left: 12rpx; min-height: 44px; line-height: 44px; color: #294b35; background: #eff2e9; }\n"},"pages/orders/orders":{"config":{"navigationBarTitleText":"我的订单","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page orders-page\">\n  <view class=\"row review-order-filters\">\n    <button wx:for=\"{{filters}}\" wx:key=\"id\" class=\"review-order-filter {{filter === item.id ? 'review-order-filter-on' : ''}}\" bindtap=\"selectFilter\" data-id=\"{{item.id}}\">{{item.name}}</button>\n  </view>\n  <view class=\"visual-panel orders-alert\" wx:if=\"{{loadError}}\">\n    <view class=\"title visual-title orders-alert-title\">订单读取失败</view>\n    <view class=\"subtitle\">{{loadError}}</view>\n    <button class=\"ghost-btn orders-retry\" bindtap=\"refresh\">重试</button>\n  </view>\n  <view class=\"visual-panel review-order\" wx:for=\"{{shownOrders}}\" wx:key=\"id\" bindtap=\"goDetail\" data-id=\"{{item.id}}\">\n    <view class=\"row space-between\">\n      <view class=\"review-order-name order-kind\">{{item.reservationId ? '预约点餐' : (item.deliveryType === 'room' ? '客房送餐' : '大厅用餐')}}</view>\n      <text class=\"review-order-state\">{{connected ? '订单已提交' : '已保存到本机'}}</text>\n    </view>\n    <view class=\"review-order-sub\" wx:if=\"{{item.when}}\">下单时间 · {{item.when}}</view>\n    <view class=\"row space-between review-order-food\">\n      <view class=\"row review-order-images\">\n        <image class=\"review-order-thumb\" wx:for=\"{{item.previews}}\" wx:for-item=\"photo\" wx:key=\"key\" src=\"{{photo.image}}\" mode=\"aspectFill\" />\n      </view>\n      <view class=\"row review-order-amount\"><text class=\"review-order-sub\">共 {{item.items.length}} 项</text><text class=\"visual-money\">¥{{item.total}}</text><text class=\"review-order-sub\">›</text></view>\n    </view>\n    <view class=\"review-order-sub\">{{item.reservationId ? item.reservationDate + ' ' + item.reservationSlot : (item.deliveryType === 'room' ? '房号 ' + item.room : (item.partySize ? item.partySize + ' 位 · ' : '') + '到店安排座位')}}</view>\n  </view>\n  <view class=\"visual-panel orders-feedback\" wx:if=\"{{loading && !orders.length}}\">正在读取订单…</view>\n  <view class=\"visual-panel orders-feedback\" wx:elif=\"{{!loadError && !shownOrders.length}}\">{{orders.length ? '该用餐方式暂无订单' : '暂无订单'}}</view>\n</view>\n","style":".orders-heading { position: relative; min-height: 98rpx; margin-bottom: 22rpx; padding-bottom: 14rpx; border-bottom: 1rpx solid #dedcd1; box-sizing: border-box; }\n.orders-heading-copy, .orders-count { position: relative; z-index: 1; }\n.orders-heading-copy .title { margin-top: 5rpx; }\n.orders-mark { right: 76rpx; bottom: 0; font-size: 120rpx; }\n.orders-count { align-self: flex-end; padding-bottom: 5rpx; color: #58665d; font-size: 25rpx; }\n.orders-alert { padding: 22rpx; margin-bottom: 18rpx; }\n.orders-alert-title { font-size: 32rpx; }\n.orders-retry { margin-top: 14rpx; min-height: 44px; }\n.order-record { padding: 23rpx 25rpx; background: #fffdf8; border-bottom: 1rpx solid #dedcd1; }\n.order-record:last-of-type { border-radius: 0 0 14rpx 14rpx; }\n.order-latest { margin-bottom: 16rpx; background: #203b32; color: #fffdf8; border: none; border-radius: 18rpx; }\n.order-latest:last-of-type { border-radius: 18rpx; }\n.order-latest + .order-record { border-radius: 14rpx 14rpx 0 0; }\n.order-latest + .order-record:last-of-type { border-radius: 14rpx; }\n.order-record-pressed, .order-record:active { background: #edece2; }\n.order-latest.order-record-pressed, .order-latest:active { background: #172d25; }\n.order-recent-label { margin-bottom: 14rpx; color: #e3c992; font-size: 23rpx; font-weight: 600; }\n.order-top { gap: 12rpx; }\n.order-kind { min-width: 0; color: #233b31; font-size: 34rpx; }\n.order-latest .order-kind { color: #fffdf8; font-size: 39rpx; }\n.order-meta { margin-top: 9rpx; color: #58665d; font-size: 25rpx; }\n.order-latest .order-meta { color: #dce6da; }\n.order-state { flex: none; padding: 5rpx 13rpx; border-radius: 8rpx; background: #eeece3; color: #4f5b51; font-size: 24rpx; font-weight: 600; white-space: nowrap; }\n.order-state-wait { background: #f1e3c5; color: #67471e; }\n.order-state-progress { background: #dce9d9; color: #234f3c; }\n.order-state-done { background: #e6ebe2; color: #40584a; }\n\n.order-foot { gap: 15rpx; margin-top: 17rpx; padding-top: 13rpx; border-top: 1rpx solid #dedcd1; }\n.order-latest .order-foot { border-top-color: #5a7064; }\n.order-ref { flex: 1; min-width: 0; }\n.order-ref-label { color: #58665d; font-size: 22rpx; }\n.order-id { color: #58665d; font-size: 23rpx; word-break: break-all; }\n.order-latest .order-ref-label, .order-latest .order-id { color: #dce6da; }\n.order-summary { flex: none; }\n.order-total { font-size: 32rpx; }\n.order-latest .order-total { color: #edd6a4; font-size: 44rpx; }\n.order-arrow { margin-left: 11rpx; color: #775b35; font-size: 35rpx; }\n.order-latest .order-arrow { color: #edd6a4; }\n.orders-feedback { padding: 44rpx 16rpx; color: #58665d; text-align: center; font-size: 27rpx; }\n.orders-empty-title { color: #233b31; font-size: 32rpx; font-weight: 600; }\n\n.review-order-filters { margin: 0 0 15rpx; border-bottom: 1rpx solid #d8ded1; }\n.review-order-filter { flex: 1; min-width: 0; min-height: 44px; line-height: 44px; padding: 0; margin: 0; background: transparent; font-size: 25rpx; border-radius: 0; color: #536458; }\n.review-order-filter-on { border-bottom: 3rpx solid #264535; color: #22392d; font-weight: 600; }\n.review-order { padding: 19rpx; margin-bottom: 14rpx; border-color: #e0e6db; }\n.review-order-name { font-weight: 600; font-size: 29rpx; }\n.review-order-state { color: #40624b; font-size: 24rpx; }\n.review-order-sub { font-size: 23rpx; color: #536458; }\n.review-order-food { margin: 14rpx 0 10rpx; gap: 10rpx; }\n.review-order-images { gap: 8rpx; min-width: 0; }\n.review-order-thumb { flex: none; width: 84rpx; height: 74rpx; border-radius: 8rpx; }\n.review-order-amount { flex: none; gap: 9rpx; font-size: 27rpx; }\n"},"pages/order-detail/order-detail":{"config":{"navigationBarTitleText":"订单详情","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page\">\n  <view class=\"card\" wx:if=\"{{order && order.paymentMethod==='qr' && order.paymentStatus!=='已支付'}}\">\n    <view class=\"row space-between\"><view class=\"title\">商家收款码</view><view class=\"price\">¥{{order.total}}</view></view>\n    <view class=\"subtitle\">订单 {{order.id}}</view>\n    <image wx:if=\"{{qrImage}}\" src=\"{{qrImage}}\" mode=\"aspectFit\" show-menu-by-longpress=\"{{true}}\" binderror=\"qrLoadFailed\" style=\"display:block;width:100%;height:400rpx;margin:16rpx auto;\" />\n    <view wx:if=\"{{qrError}}\" class=\"subtitle\">{{qrError}}</view>\n    <view class=\"subtitle\">请核对收款商家和金额，付款备注填写订单号。已经付款请等待餐厅核实，避免重复支付。</view>\n    <button class=\"ghost-btn\" bindtap=\"refreshStatus\" disabled=\"{{loading}}\">刷新收款状态</button>\n  </view>\n  <view class=\"card\" wx:if=\"{{order}}\">\n    <view class=\"row space-between\"><view class=\"title\">{{order.reservationId ? '预约点餐' : (order.deliveryType === 'room' ? '客房送餐' : '大厅用餐')}}</view><view class=\"status-pill\">{{connected ? '订单已提交' : '已保存到本机'}}</view></view>\n    <view class=\"muted\" style=\"margin-top:8rpx;\">订单号 {{order.id}}</view>\n    <view class=\"muted\" wx:if=\"{{order.paymentStatus}}\">支付状态：{{order.paymentStatus}}</view>\n    <view wx:for=\"{{order.items}}\" wx:key=\"lineKey\" class=\"row space-between\" style=\"margin-top:12rpx;\">\n      <view>{{item.name}}{{item.variantName ? ' · ' + item.variantName : ''}} × {{item.qty}}</view><view>¥{{item.subtotal}}</view>\n    </view>\n    <view class=\"receipt-total row space-between\"><view>合计</view><view class=\"price\" style=\"font-size:34rpx;\">¥{{order.total}}</view></view>\n    <view style=\"margin-top:16rpx;\" wx:if=\"{{order.reservationId}}\">预约点餐 · {{order.reservationDate}} {{order.reservationSlot}}</view>\n    <view style=\"margin-top:16rpx;\" wx:else>{{order.deliveryType === 'room' ? '客房送餐 · 房号 ' + order.room : '大厅用餐' + (order.partySize ? ' · ' + order.partySize + ' 位' : '') + ' · 到店安排座位'}}</view>\n    <view class=\"muted\" wx:if=\"{{order.reservationId}}\">预约号 {{order.reservationId}}</view>\n    <view class=\"muted\">联系人 {{order.contactName}} · {{order.displayPhone}}</view>\n    <view class=\"muted\" wx:if=\"{{order.remark}}\">备注：{{order.remark}}</view>\n  </view>\n\n  <view class=\"card dining-notice\" wx:if=\"{{order}}\">\n    <view class=\"title notice-title\">温馨提示</view>\n    <view class=\"notice-text\">菜品均在下单后现做，请稍作等候。用餐高峰时，上菜可能会慢一些，感谢您的理解。</view>\n  </view>\n\n  <button class=\"ghost-btn\" wx:if=\"{{connected && order && order.paymentMethod!=='qr' && order.paymentStatus!=='已支付'}}\" bindtap=\"refreshStatus\" disabled=\"{{loading}}\">刷新收款状态</button>\n  <view class=\"card\" wx:if=\"{{loadError}}\">\n    <view class=\"title\">订单读取失败</view>\n    <view class=\"subtitle\">{{loadError}}</view>\n    <button class=\"ghost-btn\" bindtap=\"refreshStatus\">重试</button>\n  </view>\n  <view class=\"empty\" wx:elif=\"{{!order}}\">{{loading ? '正在读取订单…' : '未找到该订单'}}</view>\n</view>\n","style":".receipt-total { margin-top: 18rpx; padding-top: 16rpx; border-top: 1rpx dashed #bdc5b7; }\n.celadon-page .dining-notice { background: #edf2e8; border-color: #d8e2d2; }\n.notice-title { margin-bottom: 10rpx; color: #294b35; font-size: 30rpx; }\n.notice-text { color: #405747; font-size: 28rpx; line-height: 1.7; }\n"},"pages/reserve/reserve":{"config":{"navigationBarTitleText":"散客预约","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page celadon-page reserve-page\">\n  <view class=\"reserve-hero reserve-hero-intro\">\n    <image class=\"reserve-view\" src=\"/images/decor/reserve-terrace.jpg\" mode=\"scaleToFill\" aria-hidden=\"true\" />\n    <view class=\"reserve-heading\">\n      <view class=\"reserve-title\">餐位预约</view>\n      <view class=\"reserve-subtitle\">山间用餐 · 云雾相伴</view>\n    </view>\n  </view>\n\n  <view class=\"reserve-body {{!date && !partySize ? 'reserve-intro' : ''}}\">\n    <view class=\"reserve-paper\">\n      <view class=\"reserve-label\">用餐类型</view>\n      <view class=\"seating-choice\">\n        <button size=\"mini\" class=\"seating-option {{type === 'hall' ? 'seating-picked' : ''}} {{hallFull ? 'seating-full' : ''}}\" bindtap=\"chooseSeating\" data-seating=\"hall\" aria-pressed=\"{{type === 'hall'}}\">\n          <view class=\"seating-content\">\n            <view class=\"seat-line\"><view class=\"seat-icon hall-icon\"></view><text>大厅用餐</text></view>\n            <text class=\"seat-note\">{{hallCode === 'hall_large_full' ? '该餐段大桌已满' : hallFull ? '该餐段桌位已满' : '每桌最多 8 位'}}</text>\n          </view>\n        </button>\n        <button size=\"mini\" class=\"seating-option {{type === 'private' ? 'seating-picked' : ''}}\" bindtap=\"chooseSeating\" data-seating=\"private\" aria-pressed=\"{{type === 'private'}}\">\n          <view class=\"seating-content\"><view class=\"seat-line\"><view class=\"seat-icon room-icon\"></view><text>包间预订</text></view></view>\n        </button>\n      </view>\n      <view wx:if=\"{{type === 'hall' && date && slotIndex}}\" class=\"field-message\">\n        {{hallLoading ? '正在确认大厅余位…' : hallError || (hallCode === 'hall_large_full' ? '该餐段的 7–8 人桌已满，请更换餐段。' : hallFull ? '该餐段大厅桌位已满，请更换时段或选择包间。' : '座位由餐厅安排，7–8 位用餐共用两张大桌。')}}\n        <button size=\"mini\" wx:if=\"{{hallError || hallFull}}\" class=\"room-refresh\" bindtap=\"refreshAvailability\">刷新余位</button>\n      </view>\n\n      <view class=\"reserve-field\">\n        <view class=\"reserve-label\">用餐时间</view>\n        <button size=\"mini\" class=\"field-trigger\" bindtap=\"toggleField\" data-field=\"date\" aria-label=\"选择用餐日期\">\n          <view class=\"field-row\"><view class=\"field-icon calendar-icon\"></view><text>{{date || '请选择用餐日期'}}</text><text class=\"field-arrow\">{{openField === 'date' ? '⌃' : '›'}}</text></view>\n        </button>\n        <view wx:if=\"{{openField === 'date'}}\" class=\"calendar-panel\">\n          <view class=\"calendar-nav\">\n            <button size=\"mini\" class=\"month-arrow {{!calendar.canBack ? 'calendar-disabled' : ''}}\" bindtap=\"changeMonth\" data-delta=\"-1\" disabled=\"{{!calendar.canBack}}\" aria-label=\"上个月\">‹</button>\n            <text>{{calendar.year}} 年 {{calendar.month}} 月</text>\n            <button size=\"mini\" class=\"month-arrow {{!calendar.canForward ? 'calendar-disabled' : ''}}\" bindtap=\"changeMonth\" data-delta=\"1\" disabled=\"{{!calendar.canForward}}\" aria-label=\"下个月\">›</button>\n          </view>\n          <view class=\"calendar-grid\">\n            <text wx:for=\"{{weekdays}}\" wx:key=\"*this\" class=\"weekday\">{{item}}</text>\n            <view wx:for=\"{{calendar.days}}\" wx:key=\"key\" class=\"day-cell\">\n              <button size=\"mini\" wx:if=\"{{item.day}}\" bindtap=\"selectDate\" data-date=\"{{item.date}}\" disabled=\"{{item.past}}\" aria-label=\"{{item.date}}\" class=\"day-button {{item.past ? 'calendar-disabled' : ''}} {{item.date === today ? 'day-today' : ''}} {{item.date === date ? 'choice-active' : ''}}\">{{item.day}}</button>\n            </view>\n          </view>\n        </view>\n        <view wx:if=\"{{date && slots.length}}\">\n          <button size=\"mini\" class=\"field-trigger\" bindtap=\"toggleField\" data-field=\"slot\" aria-label=\"选择预约时段\">\n            <view class=\"field-row\"><view class=\"field-icon clock-icon\"></view><text>{{slotChoices[slotIndex]}}</text><text class=\"field-arrow\">{{openField === 'slot' ? '⌃' : '›'}}</text></view>\n          </button>\n          <view wx:if=\"{{openField === 'slot'}}\" class=\"choice-grid\">\n            <button size=\"mini\" wx:for=\"{{slots}}\" wx:key=\"*this\" class=\"option-button {{slotIndex === index + 1 ? 'choice-active' : ''}}\" bindtap=\"onSlotChange\" data-slot=\"{{item}}\">{{item}}</button>\n          </view>\n        </view>\n        <view wx:elif=\"{{date}}\" class=\"field-message\">当日时段已结束，请改选日期。</view>\n      </view>\n      <view class=\"reserve-field\">\n        <view class=\"reserve-label\">用餐人数</view>\n        <button size=\"mini\" class=\"field-trigger\" bindtap=\"toggleField\" data-field=\"party\" aria-label=\"选择用餐人数\">\n          <view class=\"field-row\"><view class=\"field-icon person-icon\"></view><text>{{partySize ? partySize + ' 位' : '请选择人数'}}</text><text class=\"field-arrow\">{{openField === 'party' ? '⌃' : '›'}}</text></view>\n        </button>\n        <scroll-view wx:if=\"{{openField === 'party'}}\" class=\"party-scroll\" style=\"height:{{type === 'hall' ? '208rpx' : '308rpx'}};\" scroll-y=\"true\" scroll-into-view=\"{{partySize ? 'people-' + partySize : ''}}\">\n          <view class=\"choice-grid party-grid\">\n            <button size=\"mini\" wx:for=\"{{partyChoices}}\" wx:key=\"*this\" id=\"people-{{item}}\" data-size=\"{{item}}\" class=\"option-button {{partySize === item ? 'choice-active' : ''}}\" bindtap=\"onPartyChange\">{{item}} 位</button>\n          </view>\n        </scroll-view>\n      </view>\n\n      <view wx:if=\"{{type === 'private' && (partySize || roomError)}}\" class=\"reserve-field private-rooms\">\n        <view class=\"room-heading\"><view class=\"reserve-label\">选择包厢</view><button size=\"mini\" class=\"room-refresh\" bindtap=\"refreshAvailability\" disabled=\"{{roomsLoading}}\">刷新可约</button></view>\n        <view wx:if=\"{{roomsLoading}}\" class=\"field-message\">正在查询可约包厢…</view>\n        <view wx:elif=\"{{roomError}}\" class=\"field-message\">{{roomError}}</view>\n        <view wx:else>\n          <view wx:if=\"{{!date || !slotIndex}}\" class=\"field-message\">选好日期和时段后可确认包厢。</view>\n          <button size=\"mini\" wx:for=\"{{rooms}}\" wx:key=\"id\" class=\"private-room {{roomId === item.id ? 'private-selected' : ''}}\" bindtap=\"selectRoom\" data-id=\"{{item.id}}\" disabled=\"{{!date || !slotIndex || item.unavailable}}\">\n            <view class=\"room-line\"><text class=\"room-name\">{{item.name}}</text><text wx:if=\"{{!item.unavailable && item.id === suggestedRoomId}}\" class=\"room-recommend\">推荐</text><text class=\"room-state\">{{item.unavailable || (roomId === item.id ? '已选' : (date && slotIndex ? '可选' : ''))}}</text></view>\n          </button>\n        </view>\n      </view>\n    </view>\n    <view wx:if=\"{{pendingSubmission}}\" class=\"reserve-recovery\">\n      <view class=\"field-message\">上次预约结果待确认，请先查询。</view>\n      <button class=\"primary-btn reserve-submit\" bindtap=\"checkSubmission\" loading=\"{{submitting}}\" disabled=\"{{submitting}}\">查询提交结果</button>\n    </view>\n    <button wx:else class=\"primary-btn reserve-submit\" bindtap=\"openContact\">立即预约</button>\n    <view wx:if=\"{{!connected}}\" class=\"field-message offline-note\">离线体验，预约仅保存在本机。</view>\n  </view>\n  <view class=\"reserve-foot\"><image class=\"reserve-foot-art\" src=\"/images/decor/ridges.png\" mode=\"scaleToFill\" aria-hidden=\"true\" /></view>\n  <view class=\"reserve-tabs\">\n    <button wx:for=\"{{navigation}}\" wx:key=\"url\" class=\"reserve-tab\" data-url=\"{{item.url}}\" bindtap=\"openTab\"><image class=\"reserve-tab-icon\" src=\"{{item.icon}}\" mode=\"aspectFit\" /><text>{{item.label}}</text></button>\n  </view>\n\n  <view wx:if=\"{{contactOpen}}\" class=\"contact-layer\">\n    <view class=\"contact-shade\" bindtap=\"closeContact\"></view>\n    <scroll-view class=\"contact-sheet\" scroll-y=\"true\">\n      <view class=\"contact-inner\">\n        <view class=\"contact-heading\"><view class=\"reserve-title\">预约人信息</view><button class=\"contact-back\" bindtap=\"closeContact\" disabled=\"{{submitting}}\">返回修改</button></view>\n        <view class=\"contact-summary\">{{date}} · {{slots[slotIndex - 1]}} · {{partySize}} 位<text wx:if=\"{{type === 'private'}}\"> · {{selectedRoomName}}</text></view>\n        <view class=\"reserve-label\">姓名</view><input placeholder=\"预约人姓名\" value=\"{{name}}\" bindinput=\"onNameInput\" />\n        <view class=\"reserve-label\">手机号（必填）</view><input type=\"number\" maxlength=\"11\" placeholder=\"11 位手机号\" value=\"{{phone}}\" bindinput=\"onPhoneInput\" />\n        <view class=\"field-message\">餐厅用姓名和手机号核对预约、联系到店事宜。</view>\n        <view class=\"reserve-label\">备注 <text class=\"optional\">选填</text></view><textarea placeholder=\"例如：需要儿童椅\" value=\"{{remark}}\" bindinput=\"onRemarkInput\" />\n        <button class=\"primary-btn reserve-submit\" bindtap=\"submitReserve\" loading=\"{{submitting}}\" disabled=\"{{submitting}}\">确认预约</button>\n      </view>\n    </scroll-view>\n  </view>\n</view>\n","style":"page { height: 100%; }\n.reserve-page { display: flex; flex-direction: column; box-sizing: border-box; min-height: 100%; padding: 0; background: #f5f5ee; color: #263c2f; }\n.reserve-hero { position: relative; height: 340rpx; flex: none; overflow: hidden; background: #edf0e6; }\n.reserve-view { width: 100%; height: 100%; display: block; }\n.reserve-heading { position: absolute; top: 44%; left: 7.5%; }\n.reserve-title { font: 600 46rpx/1.28 \"Songti SC\", SimSun, serif; color: #213f2e; letter-spacing: 2rpx; }\n.reserve-subtitle { margin-top: 9rpx; color: #405844; font-size: 25rpx; letter-spacing: 2rpx; }\n.reserve-body { position: relative; z-index: 1; margin: -14rpx 0 0; padding: 0 32rpx; }\n.reserve-paper { box-sizing: border-box; padding: 26rpx 24rpx 6rpx; border-radius: 20rpx; background: #fffdf8; box-shadow: 0 5rpx 24rpx rgba(43, 66, 47, .07); }\n.reserve-label { font-size: 31rpx; font-weight: 600; line-height: 1.45; color: #203528; }\n.seating-choice { display: flex; align-items: stretch; gap: 15rpx; margin: 17rpx 0 6rpx; }\n.seating-option { flex: 1; min-width: 0; margin: 0; padding: 0 8rpx; line-height: 1.4; border: 1rpx solid #e0e3d8; border-radius: 13rpx; background: #fbfaf4; color: #344d3b; box-shadow: 0 3rpx 9rpx rgba(49, 64, 45, .06); }\n.seating-content { display: flex; min-height: 126rpx; flex-direction: column; align-items: center; justify-content: center; line-height: 1.4; }\n.seating-picked { background: #294b35; border-color: #294b35; color: #fffdf5; }\n.seat-line { display: flex; align-items: center; justify-content: center; gap: 13rpx; font-size: 31rpx; font-weight: 600; line-height: 1.4; }\n.seat-note { margin-top: 3rpx; font-size: 22rpx; color: inherit; }\n.seat-icon, .field-icon { position: relative; box-sizing: border-box; display: block; flex: none; }\n.seat-icon { color: #8a703e; }\n.seating-picked .seat-icon { color: #dcc393; }\n.hall-icon { width: 32rpx; height: 21rpx; margin-top: 4rpx; border: 3rpx solid currentColor; border-radius: 20rpx 20rpx 2rpx 2rpx; }\n.hall-icon::before, .hall-icon::after, .room-icon::before, .room-icon::after, .field-icon::before, .field-icon::after { content: \"\"; position: absolute; box-sizing: border-box; }\n.hall-icon::before { width: 5rpx; height: 5rpx; left: 10rpx; top: -8rpx; border-radius: 50%; background: currentColor; }\n.hall-icon::after { left: -6rpx; right: -6rpx; bottom: -7rpx; height: 2rpx; background: currentColor; }\n.room-icon { width: 26rpx; height: 26rpx; border: 2rpx solid currentColor; border-bottom: none; }\n.room-icon::before { height: 2rpx; top: -7rpx; left: -4rpx; right: -4rpx; background: currentColor; }\n.room-icon::after { bottom: 0; top: 3rpx; width: 2rpx; left: 10rpx; background: currentColor; }\n.reserve-field { padding-top: 24rpx; }\n.field-row { position: relative; display: flex; align-items: center; gap: 18rpx; min-height: 88rpx; color: #526355; font-size: 27rpx; }\n.field-row, .room-line { border-bottom: 1rpx solid #e4e6dc; }\n.reserve-field:last-child .field-row:last-child, .private-room:last-child .room-line { border-bottom: none; }\n.field-arrow { margin-left: auto; color: #5b6e5e; font-size: 35rpx; }\n.field-icon { color: #46624d; width: 30rpx; height: 30rpx; }\n.calendar-icon { height: 25rpx; border: 2rpx solid currentColor; border-radius: 4rpx; }\n.calendar-icon::before { top: -5rpx; left: 5rpx; width: 14rpx; height: 7rpx; border-left: 3rpx solid currentColor; border-right: 3rpx solid currentColor; }\n.calendar-icon::after { top: 6rpx; left: 0; right: 0; border-top: 2rpx solid currentColor; }\n.clock-icon { border: 2rpx solid currentColor; border-radius: 50%; }\n.clock-icon::before { top: 4rpx; left: 12rpx; width: 8rpx; height: 10rpx; border-left: 2rpx solid currentColor; border-bottom: 2rpx solid currentColor; }\n.person-icon::before { width: 13rpx; height: 13rpx; top: 0; left: 8rpx; border: 2rpx solid currentColor; border-radius: 50%; }\n.person-icon::after { width: 28rpx; height: 14rpx; left: 1rpx; bottom: 0; border: 2rpx solid currentColor; border-bottom: 0; border-radius: 15rpx 15rpx 0 0; }\n.room-heading, .room-line, .contact-heading { display: flex; align-items: center; gap: 12rpx; }\n.room-heading, .contact-heading { justify-content: space-between; }\n.room-refresh, .contact-back { margin: 0; padding: 0 10rpx; height: 44px; min-height: 44px; line-height: 44px; background: transparent; color: #46624d; font-size: 24rpx; }\n.private-room { margin: 0; padding: 0; border-radius: 0; background: transparent; color: #273c2d; text-align: left; }\n.private-room[disabled] { background: transparent; color: #637066; }\n.room-line { padding: 0 10rpx; min-height: 84rpx; font-size: 27rpx; line-height: 1.4; }\n.private-selected .room-line { background: #e9efe4; border-radius: 8rpx; }\n.room-recommend { font-size: 21rpx; padding: 2rpx 10rpx; background: #dce8d9; color: #37553b; border-radius: 7rpx; }\n.room-state { margin-left: auto; font-size: 24rpx; }\n.field-message, .optional { color: #5a6a5b; font-size: 24rpx; line-height: 1.5; }\n.field-message { padding: 10rpx 0 14rpx; }\n.reserve-page .reserve-submit { margin: 28rpx auto 0; width: 100%; height: 88rpx; min-height: 44px; line-height: max(88rpx, 44px); border-radius: 48rpx; font-size: 31rpx; background: #294b35; }\n.offline-note { text-align: center; }\n.reserve-foot { flex: 1; min-height: 58rpx; position: relative; overflow: hidden; }\n.reserve-foot-art { position: absolute; bottom: -8rpx; width: 100%; height: 122rpx; opacity: .38; pointer-events: none; }\n.reserve-tabs { display: flex; background: #fcfbf5; padding: 0 0 env(safe-area-inset-bottom); border-top: 1rpx solid #dfe3d6; }\n.reserve-tab { flex: 1; margin: 0; padding: 12rpx 0; min-height: 90rpx; text-align: center; color: #586454; line-height: 1.3; font-size: 21rpx; border-radius: 0; background: transparent; }\n.reserve-tab-icon { display: block; margin: 0 auto 4rpx; width: 39rpx; height: 39rpx; }\n.contact-layer { position: fixed; top: 0; bottom: 0; left: 0; right: 0; max-width: 750rpx; margin: auto; z-index: 10; display: flex; flex-direction: column; justify-content: flex-end; }\n.contact-shade { position: absolute; top: 0; right: 0; bottom: 0; left: 0; background: rgba(28, 46, 33, .34); }\n.contact-sheet { position: relative; max-height: 85vh; background: #fffdf8; border-radius: 28rpx 28rpx 0 0; }\n.contact-inner { padding: 28rpx 32rpx calc(30rpx + env(safe-area-inset-bottom)); }\n.contact-heading .reserve-title { font-size: 35rpx; }\n.contact-summary { margin: 4rpx 0 16rpx; color: #526a55; font-size: 25rpx; }\n.contact-inner .reserve-label { margin: 16rpx 0 8rpx; font-size: 27rpx; }\n.contact-inner textarea { height: 130rpx; min-height: 92rpx; }\n\n\n.reserve-hero-intro { height: 340rpx; height: clamp(320rpx, 25vh, 450rpx); }\n.reserve-intro .reserve-paper { padding-top: 33rpx; padding-bottom: 12rpx; }\n.reserve-intro .seating-content { min-height: 140rpx; }\n.reserve-intro .reserve-field { padding-top: 34rpx; }\n.reserve-intro .field-row { min-height: 94rpx; min-height: max(94rpx, 8vh); }\n.reserve-intro .reserve-submit { margin-top: 35rpx; }\n.private-room { width: 100%; }\n.contact-sheet { height: 860rpx; max-height: 85vh; }\n\n.field-trigger { display: block; width: 100%; min-width: 100%; margin: 0; padding: 0; background: transparent; text-align: left; border-radius: 0; line-height: 1.5; color: inherit; }\n.calendar-panel, .choice-grid { margin: 6rpx 0 18rpx; }\n.calendar-nav { white-space: nowrap; display: flex; align-items: center; justify-content: space-between; font-size: 28rpx; font-weight: 600; }\n.month-arrow, .day-button, .option-button { box-sizing: border-box; margin: 0; padding: 0; min-height: 44px; line-height: 44px; font-size: 27rpx; color: #294b35; background: transparent; border-radius: 9rpx; }\n.month-arrow { flex: 0 0 44px; width: 44px; max-width: 44px; font-size: 38rpx; }\n.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); text-align: center; }\n.weekday { padding: 6rpx 0; font-size: 23rpx; color: #657666; }\n.day-button, .option-button { width: 100%; max-width: 100%; }\n.day-button.day-today { font-weight: 700; box-shadow: inset 0 0 0 1px #819581; }\n.calendar-disabled { color: #aaafa5 !important; background: transparent !important; }\n.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8rpx; }\n.party-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }\n.party-scroll { display: block; height: 308rpx; }\n.seating-full { opacity: .65; }\n.room-state { flex: none; }\n.option-button { background: #eff2e9; }\n.day-button.choice-active, .option-button.choice-active { color: #fffdf8; background: #294b35; }\n"},"pages/reservations/reservations":{"config":{"navigationBarTitleText":"我的预约","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page\">\n  <view class=\"folio-heading\">\n    <view class=\"title\">我的预约</view>\n    <view class=\"subtitle\">预约经餐厅确认后留位。</view>\n    <view class=\"row history-actions\">\n      <button class=\"ghost-btn\" bindtap=\"refresh\" disabled=\"{{loading}}\">刷新状态</button>\n      <button class=\"primary-btn\" bindtap=\"book\">新建预约</button>\n    </view>\n  </view>\n  <view class=\"card\" wx:if=\"{{loadError}}\">\n    <view class=\"title\">预约读取失败</view>\n    <view class=\"subtitle\">{{loadError}}</view>\n    <view class=\"subtitle\" wx:if=\"{{reservations.length}}\">下方是上次读取的记录。</view>\n    <button class=\"ghost-btn\" bindtap=\"refresh\">重试</button>\n  </view>\n  <view class=\"card\" wx:for=\"{{reservations}}\" wx:key=\"id\">\n    <view class=\"row space-between\">\n      <view class=\"history-name\">{{item.roomName || (item.type === 'private' ? '包厢（待分配）' : '大厅')}}</view>\n      <text class=\"status-pill\">{{item.status}}</text>\n    </view>\n    <view class=\"subtitle\">{{item.date}} · {{item.slot}} · {{item.partySize}} 位</view>\n    <view class=\"subtitle\">预约号 {{item.id}}</view>\n    <view class=\"booking-dishes\" wx:if=\"{{item.orders && item.orders.length}}\">\n      <view class=\"booking-dishes-title\">已点菜品</view>\n      <view class=\"booking-order\" wx:for=\"{{item.orders}}\" wx:for-item=\"order\" wx:key=\"id\">\n        <view class=\"row space-between\">\n          <view class=\"subtitle\">{{order.paymentStatus || (order.status === '待支付' ? '待支付' : '订单已提交')}}</view>\n          <button class=\"booking-order-link\" data-id=\"{{order.id}}\" bindtap=\"openOrder\">查看订单</button>\n        </view>\n        <view class=\"booking-dish row space-between\" wx:for=\"{{order.items}}\" wx:for-item=\"dish\" wx:key=\"lineKey\">\n          <view>{{dish.name}}{{dish.variantName ? ' · ' + dish.variantName : ''}} × {{dish.qty}}</view>\n          <text class=\"booking-dish-price\">¥{{dish.subtotal}}</text>\n        </view>\n        <view class=\"booking-dishes-total\">合计 ¥{{order.total}}</view>\n      </view>\n    </view>\n    <button class=\"ghost-btn booking-order-action\" wx:if=\"{{item.canOrder}}\" data-id=\"{{item.id}}\" bindtap=\"orderForBooking\">\n      {{item.orders && item.orders.length ? '继续点菜' : '预约点餐'}}\n    </button>\n  </view>\n  <view class=\"empty\" wx:if=\"{{loading && !reservations.length}}\">正在读取预约…</view>\n  <view class=\"empty\" wx:elif=\"{{!loadError && !reservations.length}}\">暂无预约</view>\n</view>\n","style":".history-actions { margin-top: 18rpx; }\n.history-actions button { flex: 1; margin: 0; min-width: 0; }\n.history-actions button + button { margin-left: 14rpx; }\n.history-name { font-size: 31rpx; font-weight: 700; }\n.booking-dishes { margin-top: 16rpx; padding-top: 14rpx; border-top: 1rpx solid #E7DFD0; }\n.booking-dishes-title { color: #31483C; font-weight: 700; }\n.booking-order { margin-top: 10rpx; padding: 8rpx 16rpx 12rpx; border-radius: 16rpx; background: #F6F1E6; }\n.booking-dish { gap: 14rpx; padding: 6rpx 0; font-size: 26rpx; }\n.booking-dish-price { white-space: nowrap; color: #934B36; }\n.booking-dishes-total { margin-top: 6rpx; text-align: right; font-size: 25rpx; font-weight: 600; }\n.booking-order-link { margin: 0; padding: 0 8rpx; background: transparent; color: #31483C; font-size: 24rpx; line-height: 56rpx; }\n.booking-order-action { margin-top: 16rpx; }\n\n.history-actions .primary-btn { border-radius: 30rpx; }\n.booking-order { background: #eef2ea; }\n.booking-dishes { border-top-color: #d8ded1; }\n"},"pages/mine/mine":{"config":{"navigationBarTitleText":"我的","usingComponents":{},"navigationBarBackgroundColor":"#F1F3ED","navigationBarTextStyle":"black"},"template":"<view class=\"page visual-page celadon-page\">\n  <view class=\"mine-banner\">\n    <image class=\"celadon-decor mine-hills\" src=\"/images/decor/ridges.png\" mode=\"scaleToFill\" aria-hidden=\"true\" />\n    <image class=\"celadon-decor mine-bamboo\" src=\"/images/decor/bamboo.png\" mode=\"aspectFit\" aria-hidden=\"true\" />\n    <view class=\"mine-banner-copy\">\n      <view class=\"title visual-title\">{{room ? '送餐房号 ' + room : '我的用餐'}}</view>\n      <view class=\"subtitle\">牧心纪 · 云径</view>\n    </view>\n  </view>\n  <view class=\"visual-panel account-list\">\n    <button class=\"account-row\" bindtap=\"goOrders\"><view class=\"row space-between\"><text>我的订单</text><text class=\"account-meta\">{{orderCount}} 笔　›</text></view></button>\n    <button class=\"account-row\" bindtap=\"goReserve\"><view class=\"row space-between\"><text>我的预约</text><text class=\"account-meta\">{{resvCount}} 笔　›</text></view></button>\n    <button class=\"account-row\" bindtap=\"goMenu\"><view class=\"row space-between\"><text>去点餐</text><text class=\"account-meta\">›</text></view></button>\n    <button class=\"account-row\" bindtap=\"showPrivacy\"><view class=\"row space-between\"><text>用餐资料与隐私</text><text class=\"account-meta\">›</text></view></button>\n  </view>\n  <button class=\"ghost-btn\" wx:if=\"{{room}}\" bindtap=\"clearRoom\">清除本次房号</button>\n</view>\n","style":".account-list { margin-bottom: 30rpx; }\n.account-row { width: 100%; background: transparent; margin: 0; padding: 25rpx 4rpx; border-bottom: 1rpx solid #d4d7ca; border-radius: 0; color: #293d30; font-size: 30rpx; line-height: 1.55; }\n.account-meta { font-size: 25rpx; color: #5d6859; }\n\n.mine-banner { position: relative; overflow: hidden; background: #e5ebe1; min-height: 210rpx; border-radius: 15rpx; margin-bottom: 17rpx; }\n.mine-hills { width: 100%; height: 91%; left: 0; bottom: -17rpx; opacity: .78; }\n.mine-bamboo { width: 190rpx; height: 136rpx; top: -40rpx; right: -33rpx; opacity: .64; }\n.mine-banner-copy { position: relative; padding: 40rpx 20rpx 28rpx; }\n.account-list.visual-panel { box-shadow: 0 6rpx 18rpx rgba(38,69,53,.08); border-radius: 16rpx; padding: 0 17rpx; }\n.account-row { border-color: #e4e8df; min-height: 44px; }\n.account-row:last-child { border-bottom: 0; }\n"}},"style":"page {\n  background: #f7f6ef;\n  color: #29362d;\n  font-size: 28rpx;\n  line-height: 1.55;\n}\n.page { padding: 28rpx 30rpx calc(36rpx + env(safe-area-inset-bottom)); box-sizing: border-box; }\n.card { margin-bottom: 22rpx; padding: 26rpx; border: 1rpx solid #d9d9cc; border-radius: 12rpx; background: #fffef8; }\n.title { font-family: \"Songti SC\", \"Noto Serif CJK SC\", SimSun, serif; font-size: 38rpx; line-height: 1.3; font-weight: 600; color: #293d30; }\n.subtitle { margin-top: 8rpx; font-size: 26rpx; color: #586354; }\nbutton::after { border: none; }\n.primary-btn, .ghost-btn { box-sizing: border-box; height: 86rpx; line-height: 86rpx; border-radius: 12rpx; padding: 0 24rpx; font-size: 29rpx; font-weight: 600; }\n.primary-btn { background: #31483c; color: #fffef8; }\n.primary-btn[disabled] { background: #e5e6d9; color: #626959; }\n.ghost-btn { background: #e7ebdf; color: #304937; }\n.accent, .price { color: #87492f; }\n.price { font-weight: 600; font-variant-numeric: tabular-nums; }\n.muted { color: #586354; }\n.eyebrow { color: #666b59; font-size: 24rpx; }\n.status-pill, .soldout-tag { display: inline-block; flex: none; padding: 4rpx 12rpx; border-radius: 6rpx; background: #f1e4d5; color: #81482e; font-size: 23rpx; font-weight: 600; white-space: nowrap; }\n.status-pill { margin-left: 12rpx; }\n.row { display: flex; align-items: center; }\n.space-between { justify-content: space-between; }\n.bottom-bar { position: fixed; z-index: 2; left: 0; right: 0; bottom: 0; border-top: 1rpx solid #c6cbbc; background: #fffef8; padding: 18rpx 30rpx calc(18rpx + env(safe-area-inset-bottom)); }\n.bottom-bar .primary-btn { flex: none; margin: 0; }\n.empty { color: #5b6656; padding: 64rpx 24rpx; border-top: 1rpx solid #d2d6c8; text-align: center; }\ninput, textarea, .picker-value { width: 100%; box-sizing: border-box; border: 1rpx solid #cbd0c2; border-radius: 10rpx; background: #fafaf4; font-size: 28rpx; }\ninput, .picker-value { height: 82rpx; padding: 0 22rpx; }\n.picker-value { display: flex; align-items: center; justify-content: space-between; }\ntextarea { min-height: 144rpx; padding: 18rpx 22rpx; }\n.stepper-btn { flex: none; margin: 0; padding: 0; width: 64rpx; height: 64rpx; min-width: 32px; min-height: 32px; line-height: max(32px, 64rpx); text-align: center; border-radius: 50%; background: #e4e9dd; color: #31483c; font-size: 34rpx; }\n.stepper-add { background: #31483c; color: #fffef8; }\n.stepper-btn[disabled] { opacity: .45; }\n.soldout-notice { background: #f1e4d5; color: #81482e; }\n.soldout-cart-actions { flex: none; margin-left: 10rpx; }\n.soldout-remove { margin: 0 0 0 10rpx; padding: 0 14rpx; border-radius: 8rpx; height: 56rpx; line-height: 56rpx; background: #e4e9dd; color: #31483c; font-size: 24rpx; }\n.dish-img { flex: none; overflow: hidden; background: #e9e6d8; }\n.hero-img { width: 100%; height: 420rpx; border-radius: 8rpx; overflow: hidden; background: #e9e6d8; }\n.dish-img-pic, .hero-img-pic { width: 100%; height: 100%; display: block; }\n.folio-heading { padding: 4rpx 0 24rpx; margin-bottom: 22rpx; border-bottom: 2rpx solid #526452; }\n\n/* 云雾餐厅视觉系统。试点页面通过类名采用这些样式。 */\n.visual-page { min-height: 100%; background: #f4f1e9; color: #233b31; }\n.visual-panel { background: #fffdf8; border: 1rpx solid #dedcd1; border-radius: 20rpx; }\n.visual-lift { box-shadow: 0 12rpx 26rpx rgba(32, 59, 50, .10); }\n.visual-dark { background: #203b32; color: #fffdf8; }\n.visual-tone { background: #e6ebe2; color: #233b31; }\n.visual-kicker { color: #775b35; font-size: 21rpx; font-weight: 600; letter-spacing: 3rpx; line-height: 1.4; }\n.visual-title { color: #233b31; font-size: 40rpx; }\n.visual-money { color: #7b4d2d; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }\n.visual-watermark { position: absolute; z-index: 0; color: #203b32; opacity: .09; font-family: \"Songti SC\", \"Noto Serif CJK SC\", SimSun, serif; line-height: 1; pointer-events: none; }\n\n/* 青瓷竹影。页面逐个接入 celadon-page 后采用这套色彩。 */\n.celadon-page { background: #f1f3ed; color: #22392d; }\n.celadon-page .visual-panel { background: #fffdf9; border-color: #d8ded1; }\n.celadon-page .visual-lift { box-shadow: 0 12rpx 26rpx rgba(38, 69, 53, .11); }\n.celadon-page .visual-dark { background: #264535; color: #fffdf9; }\n.celadon-page .visual-tone { background: #dde5d8; color: #22392d; }\n.celadon-page .visual-title { color: #22392d; }\n.celadon-page .visual-kicker { color: #6e5b37; }\n.celadon-decor { position: absolute; pointer-events: none; }\n\n.celadon-page .card { background: #fffdf9; border-color: #d8ded1; border-radius: 18rpx; }\n.celadon-page .card.soldout-notice { background: #f1e4d5; color: #81482e; }\n.celadon-page .primary-btn { background: #264535; color: #fffdf9; }\n.celadon-page .primary-btn[disabled] { background: #dce5d9; color: #536458; }\n.celadon-page .ghost-btn { background: #e5ebe1; color: #22392d; }\n.celadon-page .picker-value, .celadon-page input, .celadon-page textarea { border-color: #d8ded1; background: #f7f9f3; }\n.celadon-page .folio-heading { border-color: #d8ded1; }\n","connected":true}