/* ===== Omakase 菜单页面 — 日式动漫风格 ===== */
/* 灵感来源: 千与千寻 · 孤独的美食家 · 夏目友人帳 · 日常 · 摇曳露营 */

/* ========== 1. 字体引入与变量 ========== */
@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP:wght@400;700;900&family=ZCOOL+KuaiLe&family=Ma+Shan+Zheng&display=swap');

:root {
  /* 日式配色 */
  --washi-white: #f5f0e8;
  --warm-white: #fffdf7;
  --wood-brown: #8b4513;
  --lantern-red: #c94040;
  --lantern-red-light: #e05a5a;
  --natsume-green: #2d6a4f;
  --natsume-green-light: #40916c;
  --noren-blue: #1a5276;
  --noren-blue-light: #2980b9;
  --golden: #e2a84b;
  --golden-light: #f5c77e;
  --campfire-orange: #d4764a;
  --ink-black: #2c2c2c;
  --washi-shadow: rgba(2, 1, 0, 0.12);
  --washi-shadow-hover: rgba(139, 69, 19, 0.2);

  /* 字体 */
  --font-japanese: 'Noto Serif JP', 'Hiragino Mincho ProN', 'SimSun', 'STSong', serif;
  --font-handwrite: 'ZCOOL KuaiLe', 'Ma Shan Zheng', 'KaiTi', cursive;

  /* 暗色模式覆写 (由 JS 控制 data-user-color-scheme) */
}

/* ========== 2. 页面全局氛围 ========== */
.page-omakase {
  background-color: var(--washi-white);
  background-image:
    /* 模拟和纸纤维纹理 */
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(139, 69, 19, 0.02) 2px,
      rgba(139, 69, 19, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(139, 69, 19, 0.015) 3px,
      rgba(139, 69, 19, 0.015) 6px
    );
  min-height: 100vh;
  position: relative;
  padding-bottom: 120px;
  overflow-x: hidden;
  /* 弹窗模式，不再需要 margin-right */
}

/* 暗色模式 */
[data-user-color-scheme='dark'] .page-omakase {
  background-color: #1a1a2e;
  background-image:
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.02) 2px,
      rgba(255, 255, 255, 0.02) 4px
    ),
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(255, 255, 255, 0.015) 3px,
      rgba(255, 255, 255, 0.015) 6px
    );
}

/* ========== 3. 暖帘横幅 ========== */
.noren-banner {
  position: relative;
  width: 100%;
  max-width: 960px;
  margin: 0 auto 40px;
  padding: 60px 20px 40px;
  text-align: center;
  overflow: hidden;
}

.noren-stripes {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  pointer-events: none;
}

.noren-stripe {
  flex: 1;
  background: linear-gradient(180deg,
    var(--noren-blue) 0%,
    var(--noren-blue-light) 30%,
    var(--noren-blue) 100%
  );
  margin: 0 1px;
  opacity: 0.08;
  transform-origin: top center;
}

.noren-stripe:nth-child(odd) {
  opacity: 0.05;
}

.noren-title {
  position: relative;
  z-index: 1;
  font-family: var(--font-handwrite);
  font-size: 2.8rem;
  color: var(--lantern-red);
  text-shadow: 0 2px 4px var(--washi-shadow);
  letter-spacing: 0.15em;
}

.noren-subtitle {
  display: block;
  font-family: var(--font-japanese);
  font-size: 1rem;
  color: var(--wood-brown);
  margin-top: 8px;
  letter-spacing: 0.3em;
  opacity: 0.8;
}

.lantern-deco {
  position: absolute;
  right: 10%;
  top: 10px;
  font-size: 2rem;
  animation: lantern-sway 3s ease-in-out infinite;
}

@keyframes lantern-sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}

/* ========== 4. 目录导航 (Outline) ========== */
.menu-outline {
  position: sticky;
  top: 60px;
  z-index: 10;
  max-width: 960px;
  margin: 0 auto 30px;
  padding: 12px 20px;
  background: rgba(245, 240, 232, 0.92);
  backdrop-filter: blur(8px);
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

[data-user-color-scheme='dark'] .menu-outline {
  background: rgba(26, 26, 46, 0.92);
}

.menu-outline-title {
  font-family: var(--font-handwrite);
  font-size: 1.05rem;
  color: var(--wood-brown);
  white-space: nowrap;
}

[data-user-color-scheme='dark'] .menu-outline-title {
  color: var(--golden-light);
}

.menu-outline-items {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.menu-outline-item {
  display: inline-block;
  padding: 4px 12px;
  font-family: var(--font-handwrite);
  font-size: 0.85rem;
  color: var(--ink-black);
  background: rgba(255,255,255,0.5);
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.2s;
  border: 1px solid transparent;
}

.menu-outline-item:hover {
  background: var(--lantern-red);
  color: white;
  border-color: var(--lantern-red-light);
  transform: translateY(-1px);
}

[data-user-color-scheme='dark'] .menu-outline-item {
  color: #ccc;
  background: rgba(255,255,255,0.08);
}

[data-user-color-scheme='dark'] .menu-outline-item:hover {
  background: var(--lantern-red);
  color: white;
}

/* ========== 5. 菜单容器 ========== */
.menu-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px;
}

/* 分类标题 */
.menu-category-title {
  font-family: var(--font-handwrite);
  font-size: 1.6rem;
  color: var(--wood-brown);
  margin: 50px 0 20px;
  padding-bottom: 8px;
  border-bottom: 2px dashed rgba(139, 69, 19, 0.3);
  position: relative;
}

[data-user-color-scheme='dark'] .menu-category-title {
  color: var(--golden-light);
  border-bottom-color: rgba(255,255,255,0.15);
}

/* ========== 6. 菜单网格 ========== */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 24px;
  margin-bottom: 40px;
}

/* ========== 7. 菜单卡片 ========== */
.menu-card {
  background: var(--warm-white);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px var(--washi-shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  cursor: pointer;
  border: 2px solid transparent;
}

.menu-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px var(--washi-shadow-hover);
}

/* 选中态 */
.menu-card.selected {
  border-color: var(--lantern-red);
  box-shadow: 0 0 0 2px var(--lantern-red-light), 0 4px 16px rgba(201, 64, 64, 0.2);
  background: #fff5f0;
}

[data-user-color-scheme='dark'] .menu-card.selected {
  border-color: var(--golden);
  box-shadow: 0 0 0 2px var(--golden-light), 0 4px 16px rgba(226, 168, 75, 0.25);
  background: #2a2a1e;
}

/* 特色卡片 (店长推荐) */
.menu-card.featured {
  grid-column: span 2;
}

/* 图片区域 */
.menu-card-image-wrapper {
  position: relative;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  background: #f0ece3;
}

.menu-card-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.menu-card:hover .menu-card-image {
  transform: scale(1.05);
}

/* 角标 */
.menu-card-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--lantern-red);
  color: white;
  font-family: var(--font-handwrite);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: 4px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
  letter-spacing: 0.1em;
}

/* 内容区 */
.menu-card-body {
  padding: 14px 16px 16px;
}

.menu-card-title {
  font-family: var(--font-handwrite);
  font-size: 1.2rem;
  color: var(--ink-black);
  margin: 0 0 6px;
  line-height: 1.4;
}

[data-user-color-scheme='dark'] .menu-card-title {
  color: #e8e0d0;
}

.menu-card-desc {
  font-family: var(--font-japanese);
  font-size: 0.8rem;
  color: #666;
  line-height: 1.6;
  margin: 0 0 10px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

[data-user-color-scheme='dark'] .menu-card-desc {
  color: #aaa;
}

/* 卡脚标签 */
.menu-card-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.menu-card-tag {
  display: inline-block;
  font-family: var(--font-japanese);
  font-size: 0.7rem;
  color: var(--campfire-orange);
  background: rgba(212, 118, 74, 0.08);
  padding: 2px 10px;
  border-radius: 12px;
  border: 1px solid rgba(212, 118, 74, 0.2);
  letter-spacing: 0.05em;
  transition: all 0.2s;
}

.menu-card-tag:hover {
  background: var(--campfire-orange);
  color: white;
}

/* 暗色模式下的卡片 */
[data-user-color-scheme='dark'] .menu-card {
  background: #22223a;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

[data-user-color-scheme='dark'] .menu-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,0.5);
}

[data-user-color-scheme='dark'] .menu-card-image-wrapper {
  background: #1a1a30;
}

/* ========== 8. 樱花飘落 ========== */
.sakura-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
  overflow: hidden;
}

.sakura-petal {
  position: absolute;
  top: -40px;
  width: 12px;
  height: 12px;
  background: radial-gradient(ellipse at 30% 30%, #ffb7c5, #ff8fa3);
  border-radius: 50% 0 50% 0;
  opacity: 0.5;
  animation: sakura-fall linear infinite;
}

.sakura-petal:nth-child(1) { left: 5%;  animation-duration: 8s;  animation-delay: 0s;   width: 10px; height: 10px; }
.sakura-petal:nth-child(2) { left: 15%; animation-duration: 10s; animation-delay: 1s;  width: 14px; height: 14px; }
.sakura-petal:nth-child(3) { left: 25%; animation-duration: 7s;  animation-delay: 0.5s; width: 8px;  height: 8px;  }
.sakura-petal:nth-child(4) { left: 35%; animation-duration: 11s; animation-delay: 2s;  width: 12px; height: 12px; }
.sakura-petal:nth-child(5) { left: 45%; animation-duration: 9s;  animation-delay: 0.8s; width: 10px; height: 10px; }
.sakura-petal:nth-child(6) { left: 55%; animation-duration: 12s; animation-delay: 1.5s; width: 13px; height: 13px; }
.sakura-petal:nth-child(7) { left: 65%; animation-duration: 8.5s; animation-delay: 3s;  width: 9px;  height: 9px;  }
.sakura-petal:nth-child(8) { left: 75%; animation-duration: 10.5s; animation-delay: 0.2s; width: 11px; height: 11px; }
.sakura-petal:nth-child(9) { left: 85%; animation-duration: 7.5s; animation-delay: 2.5s; width: 8px;  height: 8px;  }
.sakura-petal:nth-child(10) { left: 95%; animation-duration: 9.5s; animation-delay: 1.8s; width: 12px; height: 12px; }

@keyframes sakura-fall {
  0%   { transform: translateY(-20px) rotate(0deg) scale(1);   opacity: 0.5; }
  50%  { transform: translateY(50vh) rotate(180deg) scale(1.1); opacity: 0.6; }
  100% { transform: translateY(110vh) rotate(360deg) scale(0.8); opacity: 0; }
}

/* ========== 9. 蝉鸣氛围（背景音文字） ========== */
.cicada-bg {
  position: fixed;
  bottom: 80px;
  right: 40px;
  font-family: var(--font-handwrite);
  font-size: 3rem;
  color: rgba(139, 69, 19, 0.04);
  writing-mode: vertical-rl;
  letter-spacing: 0.5em;
  pointer-events: none;
  z-index: 0;
  user-select: none;
}

[data-user-color-scheme='dark'] .cicada-bg {
  color: rgba(255,255,255,0.03);
}

/* ========== 10. 页脚：富士山剪影 ========== */
.omakase-footer {
  position: relative;
  height: 140px;
  margin-top: 60px;
  overflow: hidden;
}

.mt-fuji-back {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 360px;
  height: 140px;
  background: linear-gradient(135deg, rgba(139,69,19,0.08) 0%, rgba(139,69,19,0.03) 100%);
  clip-path: polygon(10% 100%, 36% 15%, 50% 5%, 64% 15%, 90% 100%);
}

.mt-fuji {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 300px;
  height: 120px;
  background: linear-gradient(135deg, rgba(139,69,19,0.15) 0%, rgba(139,69,19,0.06) 100%);
  clip-path: polygon(12% 100%, 38% 20%, 50% 8%, 62% 20%, 88% 100%);
}

[data-user-color-scheme='dark'] .mt-fuji-back {
  background: linear-gradient(135deg, rgba(255,255,255,0.06) 0%, rgba(255,255,255,0.02) 100%);
}

[data-user-color-scheme='dark'] .mt-fuji {
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0.04) 100%);
}

/* ========== 11. 响应式设计 ========== */
@media (max-width: 980px) {
  .menu-outline {
    top: 50px;
    padding: 10px 14px;
  }

  .menu-outline-title {
    font-size: 0.95rem;
  }

  .menu-outline-item {
    font-size: 0.78rem;
    padding: 3px 10px;
  }

  .noren-title {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .page-omakase {
    padding-bottom: 100px;
  }

  .noren-title {
    font-size: 1.8rem;
  }

  .noren-subtitle {
    font-size: 0.85rem;
  }

  .menu-grid {
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
  }

  .menu-card.featured {
    grid-column: span 1;
  }

  .menu-outline {
    top: 40px;
    padding: 8px 12px;
    border-radius: 0;
  }

  .menu-category-title {
    font-size: 1.3rem;
  }
}

@media (max-width: 480px) {
  .noren-banner {
    padding: 40px 16px 30px;
  }

  .noren-title {
    font-size: 1.4rem;
  }

  .menu-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .menu-card-body {
    padding: 10px 12px 12px;
  }

  .menu-card-title {
    font-size: 1.05rem;
  }

  .menu-card-desc {
    font-size: 0.75rem;
    -webkit-line-clamp: 2;
  }

  .omakase-footer {
    height: 100px;
  }

  .sakura-container {
    display: none;
  }
}

/* ========== 卡片内图片滑动切换 (JS 驱动) ========== */
.menu-card--swipe .menu-card-image-wrapper {
  position: relative;
  overflow: hidden;
}

.menu-card--swipe .swipe-track {
  display: flex;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: calc(var(--swipe-count, 2) * 100%);
}

.menu-card--swipe .swipe-slide {
  width: calc(100% / var(--swipe-count, 2));
  flex-shrink: 0;
}

.menu-card--swipe .swipe-slide img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

/* 圆点指示器 (JS 控制 .active 类) */
.menu-card--swipe .swipe-dots {
  position: absolute;
  bottom: 8px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
}

.menu-card--swipe .swipe-dot {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.5);
  border: 1.5px solid rgba(255,255,255,0.8);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.menu-card--swipe .swipe-dot:hover {
  transform: scale(1.3);
}

.menu-card--swipe .swipe-dot.active {
  background: var(--lantern-red, #c94040);
  border-color: var(--lantern-red, #c94040);
}

/* 左右箭头按钮 */
.menu-card--swipe .swipe-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid rgba(0,0,0,0.1);
  color: var(--ink-black, #2c2c2c);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s, background 0.2s;
  pointer-events: none;
  line-height: 1;
  user-select: none;
  box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}

.menu-card--swipe .menu-card-image-wrapper:hover .swipe-arrow {
  opacity: 1;
  pointer-events: auto;
}

.menu-card--swipe .swipe-arrow:hover {
  background: rgba(255,255,255,1);
  transform: translateY(-50%) scale(1.1);
}

.menu-card--swipe .swipe-arrow:active {
  transform: translateY(-50%) scale(0.95);
}

.menu-card--swipe .swipe-arrow--left {
  left: 8px;
}

.menu-card--swipe .swipe-arrow--right {
  right: 8px;
}

/* 移动端隐藏箭头（使用触摸滑动） */
@media (pointer: coarse) {
  .menu-card--swipe .swipe-arrow {
    display: none !important;
  }
}

/* badge 在滑动卡片中保持在图片上方 */
.menu-card--swipe .menu-card-badge {
  z-index: 3;
}

/* ========== 12. 购物车浮动按钮 ========== */
  .cart-float-btn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--lantern-red), var(--lantern-red-light));
    color: white;
    border: none;
    box-shadow: 0 4px 16px rgba(201, 64, 64, 0.35);
    cursor: pointer;
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: transform 0.2s, box-shadow 0.2s;
    user-select: none;
    touch-action: none;
  }

.cart-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(201, 64, 64, 0.5);
}

.cart-float-btn:active {
  transform: scale(0.95);
}

.cart-float-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  background: var(--golden);
  color: #1a1a2e;
  font-size: 0.7rem;
  font-weight: 700;
  min-width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  padding: 0 4px;
  font-family: var(--font-handwrite);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

[data-user-color-scheme='dark'] .cart-float-btn {
  background: linear-gradient(135deg, var(--golden), #c9902e);
  color: #1a1a2e;
  box-shadow: 0 4px 16px rgba(226, 168, 75, 0.35);
}

/* ========== 13. 遮罩层 ========== */
.order-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4);
  z-index: 9995;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s;
}

.order-overlay.show {
  opacity: 1;
  visibility: visible;
}

/* ========== 14. 点菜车弹窗（原侧边栏） ========== */
.order-sidebar {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 360px;
  max-width: 90vw;
  max-height: 80vh;
  background: var(--warm-white);
  border-radius: 16px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  z-index: 9996;
  display: flex;
  flex-direction: column;
  font-family: var(--font-handwrite);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.order-sidebar.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

[data-user-color-scheme='dark'] .order-sidebar {
  background: #22223a;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

/* 弹窗头部 */
.order-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(139, 69, 19, 0.1);
  flex-shrink: 0;
}

[data-user-color-scheme='dark'] .order-sidebar-header {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.order-sidebar-title {
  font-size: 1.15rem;
  color: var(--ink-black);
}

[data-user-color-scheme='dark'] .order-sidebar-title {
  color: var(--golden-light);
}

.order-sidebar-count {
  background: var(--lantern-red);
  color: white;
  font-size: 0.8rem;
  min-width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 0 6px;
  font-weight: 700;
}

[data-user-color-scheme='dark'] .order-sidebar-count {
  background: var(--golden);
  color: #1a1a2e;
}

/* 弹窗列表区 */
.order-sidebar-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 14px;
}

.order-sidebar-empty {
  text-align: center;
  color: #999;
  font-size: 0.9rem;
  padding: 30px 0;
}

[data-user-color-scheme='dark'] .order-sidebar-empty {
  color: #777;
}

.order-sidebar-item {
  padding: 8px 12px;
  margin-bottom: 6px;
  background: rgba(201, 64, 64, 0.06);
  border-radius: 6px;
  font-size: 0.9rem;
  color: var(--ink-black);
  border-left: 3px solid var(--lantern-red);
  transition: background 0.2s;
}

.order-sidebar-item:hover {
  background: rgba(201, 64, 64, 0.12);
}

[data-user-color-scheme='dark'] .order-sidebar-item {
  background: rgba(226, 168, 75, 0.08);
  color: #e8e0d0;
  border-left-color: var(--golden);
}

[data-user-color-scheme='dark'] .order-sidebar-item:hover {
  background: rgba(226, 168, 75, 0.16);
}

/* 弹窗底部（输入框 + 按钮） */
.order-sidebar-footer {
  padding: 12px 14px 16px;
  border-top: 1px solid rgba(139, 69, 19, 0.1);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

[data-user-color-scheme='dark'] .order-sidebar-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.order-sidebar-input {
  width: 100%;
  padding: 8px 12px;
  border: 1.5px solid rgba(139, 69, 19, 0.2);
  border-radius: 6px;
  font-family: var(--font-handwrite);
  font-size: 0.85rem;
  background: var(--washi-white);
  color: var(--ink-black);
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.order-sidebar-remark {
  resize: vertical;
  min-height: 46px;
  line-height: 1.5;
}

.order-sidebar-input:focus {
  border-color: var(--lantern-red);
}

[data-user-color-scheme='dark'] .order-sidebar-input {
  background: #1a1a30;
  border-color: rgba(255, 255, 255, 0.15);
  color: #e8e0d0;
}

[data-user-color-scheme='dark'] .order-sidebar-input:focus {
  border-color: var(--golden);
}

.order-sidebar-btn {
  width: 100%;
  padding: 10px 0;
  border: none;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--lantern-red), var(--lantern-red-light));
  color: white;
  font-family: var(--font-handwrite);
  font-size: 1rem;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.1s;
  letter-spacing: 0.1em;
}

.order-sidebar-btn:hover:not(:disabled) {
  opacity: 0.9;
  transform: translateY(-1px);
}

.order-sidebar-btn:active:not(:disabled) {
  transform: translateY(0);
}

.order-sidebar-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

[data-user-color-scheme='dark'] .order-sidebar-btn {
  background: linear-gradient(135deg, var(--golden), #c9902e);
  color: #1a1a2e;
}

.order-sidebar-clear {
  width: 100%;
  padding: 6px 0;
  border: 1.5px solid rgba(139, 69, 19, 0.2);
  border-radius: 6px;
  background: transparent;
  color: var(--ink-black);
  font-family: var(--font-handwrite);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.order-sidebar-clear:hover {
  border-color: var(--lantern-red);
  color: var(--lantern-red);
  background: rgba(201, 64, 64, 0.06);
}

[data-user-color-scheme='dark'] .order-sidebar-clear {
  border-color: rgba(255, 255, 255, 0.15);
  color: #ccc;
}

[data-user-color-scheme='dark'] .order-sidebar-clear:hover {
  border-color: var(--golden);
  color: var(--golden);
  background: rgba(226, 168, 75, 0.1);
}

/* 确认区（内联在弹窗底部） */
.order-sidebar-confirm {
  padding: 4px 0 2px;
  text-align: center;
}
.order-sidebar-confirm .confirm-text {
  margin: 0 0 6px;
  font-family: var(--font-handwrite);
  font-size: 0.95rem;
  color: var(--lantern-red);
}
.order-sidebar-confirm .confirm-btns {
  display: flex;
  gap: 8px;
}
.order-sidebar-confirm .confirm-yes {
  flex: 1;
}
.order-sidebar-confirm .confirm-no {
  flex: 1;
}

[data-user-color-scheme='dark'] .order-sidebar-confirm .confirm-text {
  color: var(--golden-light);
}

/* 拖拽状态 — 禁用 hover 动画，显示抓取光标 */
.float-btn-dragging {
  cursor: grabbing !important;
  transition: none !important;
  transform: scale(1.15) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25) !important;
}

/* ========== 15. 响应式：移动端弹窗适配 ========== */
@media (max-width: 768px) {
  .order-sidebar {
    width: 90vw;
    max-height: 70vh;
  }

  .cart-float-btn {
    bottom: 60px;
    right: 14px;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }

  .music-float-btn {
    bottom: 60px;
    left: 14px;
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
  }
  .music-panel:not(.dragged) {
    bottom: 114px;
    left: 14px;
  }
}

/* ========== 16. 音乐播放器 ========== */
/* 浮动按钮 */
.music-float-btn {
  position: fixed;
  z-index: 999;
  bottom: 80px;
  left: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: var(--bg-card, #fff);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s, box-shadow 0.2s;
  color: var(--lantern-red, #c94040);
  line-height: 1;
  user-select: none;
  touch-action: none;
}
.music-float-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}
.music-float-btn:active {
  transform: scale(0.95);
}

[data-user-color-scheme='dark'] .music-float-btn {
  background: #2c2c2c;
  color: var(--golden-light, #e2a84b);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* 控制面板 */
.music-panel {
  position: fixed;
  z-index: 998;
  bottom: 144px;
  left: 20px;
  background: var(--bg-card, #fff);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
  padding: 10px 14px;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 140px;
  transition: opacity 0.25s, transform 0.25s;
  transform-origin: bottom left;
}
.music-panel.visible {
  display: flex;
}

[data-user-color-scheme='dark'] .music-panel {
  background: #2c2c2c;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.music-panel-track {
  font-size: 0.8rem;
  color: #888;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

[data-user-color-scheme='dark'] .music-panel-track {
  color: #aaa;
}

.music-panel-controls {
  display: flex;
  gap: 8px;
}

.music-panel-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
  color: #555;
  line-height: 1;
  padding: 0;
}
.music-panel-btn:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.2);
}

[data-user-color-scheme='dark'] .music-panel-btn {
  color: #ccc;
  border-color: rgba(255, 255, 255, 0.15);
}
[data-user-color-scheme='dark'] .music-panel-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}
