/* 海风·日咖夜酒 — 海岛清爽风样式
   日/夜主题通过 body.theme-day / body.theme-night 切换 */

:root {
  --max-w: 480px;
  --radius: 18px;
  --radius-sm: 12px;
  --gap: 14px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

/* ===== 白天主题：椰绿清爽 ===== */
body.theme-day {
  --bg: #eef7f0;
  --bg-grad: linear-gradient(180deg, #f3fbf4 0%, #e6f5ec 100%);
  --surface: #ffffff;
  --surface-2: #f5faf6;
  --text: #1d3a2a;
  --text-soft: #5b7a68;
  --primary: #1aa874;
  --primary-soft: #d6f2e4;
  --accent: #ff8a3d;
  --accent-soft: #ffe6d2;
  --line: #e2efe7;
  --shadow: 0 6px 20px rgba(26, 168, 116, 0.12);
}

/* ===== 夜晚主题：落日暖调 ===== */
body.theme-night {
  --bg: #0e1626;
  --bg-grad: linear-gradient(180deg, #16213a 0%, #0c1322 100%);
  --surface: #18243c;
  --surface-2: #1f2e49;
  --text: #f3f6fb;
  --text-soft: #9fb2cc;
  --primary: #ff8a3d;
  --primary-soft: #4a2f1c;
  --accent: #ffd166;
  --accent-soft: #4a3a16;
  --line: #2a3a57;
  --shadow: 0 6px 22px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image: var(--bg-grad);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  transition: background-color .4s ease, color .4s ease;
}

.app {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100%;
  position: relative;
  padding-bottom: 96px; /* 给底部购物车栏留位 */
}

/* ===== 顶部品牌区 ===== */
.hero {
  padding: 22px 18px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { font-size: 30px; }
.brand .name { font-size: 20px; font-weight: 800; letter-spacing: .5px; }
.brand .tag { font-size: 12px; color: var(--text-soft); margin-top: 2px; }

.mode-toggle {
  display: inline-flex;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
}
.mode-toggle button {
  border: 0;
  background: transparent;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 700;
  padding: 7px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .25s ease;
  font-family: var(--font);
}
.mode-toggle button.active {
  background: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}

.hero-sub {
  padding: 0 18px 14px;
  font-size: 13px;
  color: var(--text-soft);
}

/* 桌号输入 */
.table-bar {
  margin: 0 18px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: var(--shadow);
}
.table-bar label { font-size: 14px; font-weight: 700; white-space: nowrap; }
.table-bar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 15px;
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font);
  outline: none;
}
.table-bar input:focus { border-color: var(--primary); }

/* ===== 菜单 ===== */
.menu-group { margin: 0 18px 18px; }
.group-title {
  font-size: 15px;
  font-weight: 800;
  margin: 6px 2px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.group-title::before {
  content: "";
  width: 4px; height: 16px;
  border-radius: 4px;
  background: var(--primary);
}
.item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.item .icon {
  width: 52px; height: 52px;
  flex: 0 0 52px;
  border-radius: 14px;
  background: var(--primary-soft);
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
}
.item .info { flex: 1; min-width: 0; }
.item .info .n { font-size: 15px; font-weight: 700; }
.item .info .d {
  font-size: 12px; color: var(--text-soft);
  margin-top: 3px; line-height: 1.4;
  overflow: hidden; text-overflow: ellipsis;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
.item .info .p { font-size: 15px; font-weight: 800; color: var(--accent); margin-top: 5px; }
.item .info .p small { font-size: 11px; font-weight: 600; }

/* 加购 / 数量控件 */
.stepper { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.stepper button {
  width: 30px; height: 30px;
  border-radius: 50%;
  border: 1px solid var(--primary);
  background: var(--primary);
  color: #fff;
  font-size: 18px; font-weight: 700;
  line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: transform .1s ease;
}
.stepper button:active { transform: scale(.9); }
.stepper .qty { min-width: 18px; text-align: center; font-weight: 800; font-size: 15px; }
.stepper .add-only {
  width: 34px; height: 34px;
}

/* ===== 底部购物车栏 ===== */
.cartbar {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 14px;
  width: calc(var(--max-w) - 28px);
  max-width: calc(100% - 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: 0 10px 30px rgba(0,0,0,.18);
  display: flex;
  align-items: center;
  padding: 8px 8px 8px 18px;
  z-index: 40;
}
.cartbar .cart-ico { position: relative; font-size: 24px; margin-right: 10px; }
.cartbar .badge {
  position: absolute; top: -6px; right: -10px;
  background: var(--accent); color: #1d2b00;
  font-size: 11px; font-weight: 800;
  min-width: 18px; height: 18px; padding: 0 4px;
  border-radius: 999px; display: flex; align-items: center; justify-content: center;
}
.cartbar .total { flex: 1; font-size: 17px; font-weight: 800; }
.cartbar .total small { font-size: 11px; font-weight: 600; color: var(--text-soft); display: block; }
.cartbar .checkout {
  border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 15px;
  padding: 12px 22px; border-radius: 999px;
  font-family: var(--font);
  transition: opacity .2s ease;
}
.cartbar .checkout:disabled { opacity: .45; cursor: not-allowed; }

/* ===== 购物车抽屉 ===== */
.mask {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 50; display: none;
}
.mask.show { display: block; }
.drawer {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(100%);
  bottom: 0; width: var(--max-w); max-width: 100%;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  z-index: 60;
  max-height: 78vh; display: flex; flex-direction: column;
  transition: transform .3s ease;
  box-shadow: 0 -10px 40px rgba(0,0,0,.25);
}
.drawer.show { transform: translateX(-50%) translateY(0); }
.drawer .dh {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 12px;
}
.drawer .dh h3 { font-size: 17px; }
.drawer .dh .clear { background: none; border: 0; color: var(--text-soft); font-size: 13px; cursor: pointer; }
.drawer .list { overflow-y: auto; padding: 0 18px; flex: 1; }
.crow {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.crow .ci { font-size: 22px; }
.crow .cn { flex: 1; font-size: 14px; font-weight: 700; }
.crow .cn small { display: block; color: var(--text-soft); font-weight: 600; font-size: 12px; }
.crow .cp { font-weight: 800; font-size: 14px; color: var(--accent); margin: 0 6px; }
.drawer .dt {
  padding: 14px 18px 22px;
  border-top: 1px solid var(--line);
}
.drawer .dt .row { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 8px; color: var(--text-soft); }
.drawer .dt .row.grand { font-size: 18px; font-weight: 800; color: var(--text); }
.drawer .dt .row.grand b { color: var(--accent); }
.drawer .submit {
  width: 100%; border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 16px;
  padding: 14px; border-radius: 14px;
  font-family: var(--font);
  margin-top: 6px;
}

/* ===== 下单成功弹窗 ===== */
.modal {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(0,0,0,.5);
  display: none; align-items: center; justify-content: center;
  padding: 24px;
}
.modal.show { display: flex; }
.card {
  background: var(--surface);
  border-radius: 22px;
  width: 100%; max-width: 360px;
  padding: 26px 22px;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.card .ok { font-size: 44px; }
.card h3 { margin: 8px 0 4px; font-size: 19px; }
.card .oid { font-size: 13px; color: var(--text-soft); margin-bottom: 14px; }
.card .sum {
  background: var(--surface-2); border-radius: 14px;
  padding: 14px; text-align: left; margin-bottom: 16px;
}
.card .sum .ln { display: flex; justify-content: space-between; font-size: 13px; margin: 4px 0; }
.card .sum .ln.t { font-weight: 800; font-size: 15px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.card .done {
  width: 100%; border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 15px; padding: 13px; border-radius: 12px;
  font-family: var(--font);
}
.card .note { font-size: 12px; color: var(--text-soft); margin-top: 12px; line-height: 1.5; }

/* 空购物车提示 */
.empty { text-align: center; color: var(--text-soft); padding: 30px 0; font-size: 14px; }

/* 滚动条美化（抽屉内） */
.list::-webkit-scrollbar { width: 6px; }
.list::-webkit-scrollbar-thumb { background: var(--line); border-radius: 6px; }

/* ===== 五只吉祥物卡通动画头像 ===== */
.pet-av { display: inline-flex; width: 64px; height: 64px; }
.pet-img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%;
  display: block; box-shadow: 0 2px 8px rgba(0,0,0,.08);
}

/* 头像动画 */
.anim-bob {
  animation: petBob 3.2s ease-in-out infinite;
  transform-origin: center bottom;
}
.anim-tilt {
  animation: petTilt 4s ease-in-out infinite;
  transform-origin: center bottom;
}
.anim-wiggle {
  animation: petWiggle 2.6s ease-in-out infinite;
  transform-origin: center bottom;
}
@keyframes petBob {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-4px) scale(1.02); }
}
@keyframes petTilt {
  0%, 100% { transform: rotate(-2deg); }
  50% { transform: rotate(2deg); }
}
@keyframes petWiggle {
  0%, 100% { transform: rotate(-1deg); }
  25% { transform: rotate(2deg); }
  75% { transform: rotate(-2deg); }
}

/* 入场页宠物排布（5 只） */
.w-pets {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  margin: 20px 0 2px;
}
.pet-card { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.pet-card .pet-av { width: 62px; height: 62px; }
.pet-nm { font-size: 13px; font-weight: 800; color: var(--text); }
.pet-ki { font-size: 10px; color: var(--text-soft); }

/* hero logo 内迷你宠物排 */
.brand .logo { display: flex; align-items: center; gap: 3px; }
.brand .logo .pet-av { width: 28px; height: 28px; }

/* 饮品图标：换成对应宠物头像并上色 */
.item .icon { position: relative; overflow: hidden; padding: 0; }
.item .icon .pet-img { width: 100%; height: 100%; border-radius: 50%; }
.item .icon.m-xuegao  { background: #FFF6E9; }
.item .icon.m-xiaomai { background: #FFF6E9; }
.item .icon.m-heitao  { background: #E9E9EE; }
.item .icon.m-sanxi   { background: #FDEFE0; }
.item .icon.m-tudou   { background: #F0F0F3; }
.item .icon .m-tag {
  position: absolute; right: 3px; bottom: 3px;
  font-size: 9px; font-weight: 800; line-height: 1;
  background: rgba(0,0,0,.45); color: #fff;
  padding: 2px 5px; border-radius: 8px;
}

/* ===== 入场页 ===== */
.welcome {
  max-width: var(--max-w);
  margin: 0 auto;
  min-height: 100vh;
  padding: 8vh 22px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.welcome.hidden { display: none; }
.w-brand { margin-bottom: 10px; }
.w-title {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 1px;
  line-height: 1.3;
}
.w-title .dot { color: var(--accent); }
.w-sub { margin-top: 12px; display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.b-tag {
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--text-soft);
  opacity: .55;
  transition: all .3s ease;
}
.b-tag.active {
  opacity: 1;
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--text);
  box-shadow: var(--shadow);
}
.w-table {
  margin: 22px 0 4px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-soft);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}
.w-people { width: 100%; margin-top: 26px; }
.wp-label { font-size: 15px; font-weight: 800; margin-bottom: 14px; }
.wp-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.wp-chip {
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  border-radius: 14px;
  font-size: 18px;
  font-weight: 800;
  cursor: pointer;
  font-family: var(--font);
  transition: all .15s ease;
  display: flex; align-items: center; justify-content: center;
}
.wp-chip:active { transform: scale(.94); }
.wp-chip.selected {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: var(--shadow);
}
.w-enter {
  margin-top: 30px;
  width: 100%;
  border: 0;
  cursor: pointer;
  background: var(--primary);
  color: #fff;
  font-weight: 800;
  font-size: 17px;
  padding: 16px;
  border-radius: 16px;
  font-family: var(--font);
  box-shadow: var(--shadow);
  transition: opacity .2s ease;
}
.w-enter:disabled { opacity: .4; cursor: not-allowed; }
.w-foot { margin-top: 16px; font-size: 12px; color: var(--text-soft); }

/* ===== 桌号 + 人数 信息栏 ===== */
.order-info {
  margin: 0 18px 14px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.order-info .chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.order-info .chip-input {
  flex: 1;
  min-width: 120px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 9px 16px;
  font-size: 14px;
  font-weight: 700;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font);
  outline: none;
}
.order-info .chip-input:focus { border-color: var(--primary); }

/* ===== 规格选择面板 ===== */
.spec-sheet {
  position: fixed; left: 50%; transform: translateX(-50%) translateY(100%);
  bottom: 0; width: var(--max-w); max-width: 100%;
  background: var(--bg);
  border-radius: 22px 22px 0 0;
  z-index: 70;
  max-height: 86vh; display: flex; flex-direction: column;
  transition: transform .3s ease;
  box-shadow: 0 -10px 40px rgba(0,0,0,.25);
}
.spec-sheet.show { transform: translateX(-50%) translateY(0); }
.spec-sheet .sh {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 18px 12px;
  border-bottom: 1px solid var(--line);
}
.spec-sheet .s-name { font-size: 17px; font-weight: 800; }
.spec-sheet .s-close {
  border: 0; background: var(--surface-2); color: var(--text-soft);
  width: 34px; height: 34px; border-radius: 50%; font-size: 20px;
  cursor: pointer; line-height: 1;
}
.spec-sheet .s-body { overflow-y: auto; padding: 4px 18px; flex: 1; }
.spec-sheet .s-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.spec-sheet .s-label {
  flex: 0 0 52px; font-size: 15px; font-weight: 800; padding-top: 6px;
}
.spec-sheet .opts { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; }
.spec-sheet .opt {
  border: 1px solid var(--line); background: var(--surface);
  color: var(--text); border-radius: 999px;
  padding: 9px 16px; font-size: 14px; font-weight: 700;
  cursor: pointer; font-family: var(--font);
  transition: all .15s ease;
}
.spec-sheet .opt.on {
  background: var(--primary); border-color: var(--primary); color: #fff;
  box-shadow: var(--shadow);
}
.spec-sheet .s-ml {
  font-size: 13px; color: var(--text-soft);
  padding: 12px 0; border-bottom: 1px solid var(--line);
}
.spec-sheet .s-foot {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px 22px; border-top: 1px solid var(--line);
}
.spec-sheet .s-total { flex: 1; font-size: 18px; font-weight: 800; color: var(--accent); }
.spec-sheet .s-add {
  border: 0; cursor: pointer;
  background: var(--primary); color: #fff;
  font-weight: 800; font-size: 16px; padding: 14px 26px; border-radius: 14px;
  font-family: var(--font);
}
.spec-sheet .s-add:active { transform: scale(.97); }

/* 规格提示（菜单卡片） */
.item .spec-hint {
  font-size: 11px; color: var(--primary);
  margin-top: 5px; font-weight: 600;
}
.item .added {
  font-size: 12px; color: var(--primary); font-weight: 800;
  margin-left: 4px;
}
