:root {
  --bg0: #1a120e;
  --bg1: #2b1c14;
  --paper: #fff8f0;
  --ink: #1a120e;
  --muted: #5c4a3c;
  --accent: #e06b2c;
  --accent-2: #b33d12;
  --line: rgba(42, 28, 20, 0.14);
  --ok: #1f6b3a;
  --warn: #b7791f;
  --card: #fffdf9;
  --shadow: 0 12px 40px rgba(26, 18, 14, 0.18);
  --radius: 18px;
  /* safe-area：部分浏览器（尤其 iOS Chrome）会读成 0，由 JS 写入 --sat-fix 兜底 */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --sat-fix: 0px;
  /* 适老：更大字号、更清晰黑体 */
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Heiti SC", "Noto Sans SC", sans-serif;
  --fs: 18px;
  --lh: 1.65;
}

* { box-sizing: border-box; }
html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: #120c09;
  /* 必须显式 overflow-y:auto：hidden+visible 在安卓会变成套叠滚动容器，首页滑不动 */
  overflow-x: hidden;
  overflow-y: auto;
}
html, body {
  margin: 0;
  min-height: 100%;
  height: auto;
}
a, button, input, select, textarea, label {
  touch-action: manipulation;
}
body {
  font-family: var(--font);
  font-size: var(--fs);
  font-weight: 500;
  line-height: var(--lh);
  letter-spacing: 0.02em;
  color: var(--ink);
  min-height: 100vh;
  background: transparent;
}
/* 不用 background-attachment:fixed：安卓 Chrome/微信 WebView 会把页面锁在视口高度 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 10% 0%, #5a2f1a 0%, transparent 45%),
    radial-gradient(ellipse at 90% 10%, #8a3d1c 0%, transparent 40%),
    linear-gradient(180deg, var(--bg1), var(--bg0) 40%, #120c09);
}

#app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  position: relative;
  z-index: 1;
  padding-bottom: calc(16px + var(--safe-bottom));
  overflow-x: clip;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  backdrop-filter: blur(10px);
  background: linear-gradient(180deg, rgba(26,18,14,.96), rgba(26,18,14,.88));
  color: #fff8f0;
}
.topbar.is-main {
  padding: 0;
  gap: 0;
}
.topbar.is-main .icon-btn {
  display: none;
}
.top-nav {
  flex: 1;
  min-width: 0;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  padding: 0;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.35);
  height: 64px;
  box-sizing: border-box;
}
.top-nav.is-hidden {
  display: none;
}
.top-nav button {
  appearance: none;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #d4b89a;
  padding: 0;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 0;
  height: 100%;
  width: 100%;
  display: grid;
  place-items: center;
}
.top-nav button.active {
  background: rgba(224, 107, 44, 0.92);
  color: #fff8f0;
  border-radius: 0;
}
.topbar-page-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-page-title.is-hidden {
  display: none;
}
.topbar-spacer {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
}
.topbar-title {
  flex: 1;
  min-width: 0;
  text-align: center;
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topbar-brand {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.topbar-brand .topbar-title {
  flex: 0 1 auto;
  text-align: left;
}
.topbar-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.icon-btn {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(255,232,212,.28);
  background: rgba(255,255,255,.08);
  color: #fff8f0;
  border-radius: 12px;
  font: inherit;
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
}
.icon-btn-home {
  display: grid;
  place-items: center;
  padding: 0;
  overflow: hidden;
}
.icon-btn-home .topbar-home-icon {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
#btn-today {
  font-size: 1.05rem;
  letter-spacing: 0;
  background: rgba(224, 107, 44, 0.88);
  border-color: rgba(255, 200, 150, 0.35);
}
#btn-today:active {
  transform: scale(0.96);
}
.icon-btn.is-ghost {
  visibility: hidden;
  pointer-events: none;
}

#view { padding: 10px 16px 12px; overflow-x: clip; }

.site-copy {
  margin: 8px 16px 20px;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: rgba(255, 232, 212, 0.28);
  user-select: none;
  pointer-events: none;
}

.hero {
  position: relative;
  margin: 8px 0 20px;
  padding: 26px 20px 24px;
  border-radius: 24px;
  overflow: hidden;
  color: #fff8f0;
  background:
    linear-gradient(135deg, rgba(224,107,44,.94), rgba(90,40,20,.82)),
    url("data:image/svg+xml,%3Csvg width='160' height='160' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='20' cy='20' r='2' fill='%23ffffff' opacity='.15'/%3E%3C/svg%3E");
  box-shadow: var(--shadow);
  animation: rise .6s ease both;
}
.hero-brand { margin-bottom: 12px; }
.hero-brand img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: block;
  box-shadow: 0 8px 24px rgba(0,0,0,.28);
}
.hero h1 {
  margin: 0 0 10px;
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.04em;
}
.hero p {
  margin: 0 0 18px;
  opacity: 1;
  font-size: 1rem;
  line-height: 1.7;
  font-weight: 500;
}
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: 14px;
  overflow: hidden;
  background: #1a120e;
  margin: 4px 0 10px;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
.video-open-link {
  display: block;
  text-align: center;
  color: var(--accent-2);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.video-tip {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.6;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.meal-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin: 4px 0 12px;
}
.hero .meal-tabs { margin-top: 4px; }
.meal-tab {
  appearance: none;
  border: 2px solid rgba(255,248,240,.45);
  background: rgba(255,255,255,.12);
  color: #fff8f0;
  border-radius: 999px;
  padding: 12px 8px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.meal-tab em {
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 700;
  opacity: 1;
  background: rgba(0,0,0,.18);
  border-radius: 999px;
  padding: 2px 8px;
  min-width: 1.4em;
  text-align: center;
}
.meal-tab em.is-zero {
  background: rgba(255,255,255,.12);
  opacity: .75;
}
.panel .meal-tabs .meal-tab em.is-zero {
  background: #efe2d4;
  color: var(--muted);
}
.meal-tab.is-empty:not(.active) {
  opacity: 0.85;
}
.meal-tab.active {
  background: #fff8f0;
  color: var(--accent-2);
  border-color: #fff8f0;
}
.panel .meal-tabs .meal-tab {
  border-color: #d9cbbd;
  background: #fff;
  color: var(--ink);
}
.panel .meal-tabs .meal-tab.active {
  background: rgba(224,107,44,.16);
  border-color: var(--accent);
  color: var(--accent-2);
}
.panel .meal-tabs .meal-tab em {
  background: rgba(224,107,44,.18);
  color: var(--accent-2);
}

.btn {
  appearance: none;
  border: 0;
  border-radius: 999px;
  padding: 16px 22px;
  font: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform .15s ease, opacity .15s ease;
  min-height: 52px;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: #fff8f0; color: var(--accent-2); }
.btn-ghost {
  background: transparent;
  color: #fff8f0;
  border: 2px solid rgba(255,248,240,.65);
}
.btn-accent { background: var(--accent); color: #fff; }
.btn-block { width: 100%; }
.btn-sm {
  padding: 10px 14px;
  font-size: 0.95rem;
  min-height: 42px;
}

.section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 20px 0 12px;
  color: #fff3e6;
}
.section-title h2 {
  margin: 0;
  font-size: 1.2rem;
  font-family: var(--font);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.section-title a, .section-title button.link {
  color: #ffe0b8;
  background: none;
  border: 0;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.cat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px 10px;
  text-align: center;
  border: 1px solid rgba(255,255,255,.35);
  cursor: pointer;
  animation: rise .5s ease both;
  min-height: 88px;
}
.cat-card .ico { font-size: 26px; display: block; margin-bottom: 8px; }
.cat-card .name { font-size: 0.95rem; font-weight: 700; color: var(--ink); }

.pick-meals {
  margin: 4px 0 12px;
}
.pick-room-bar {
  margin: 0 0 14px;
  padding: 16px;
  border-radius: 16px;
  background: var(--card);
}
.pick-room-bar p {
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.5;
}
.pick-room-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.pick-room-actions .btn {
  width: 100%;
  margin: 0;
}

.search-box {
  display: flex;
  gap: 10px;
  margin-bottom: 14px;
  align-items: stretch;
}
.search-box input#search-q {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  border: 2px solid #d9cbbd;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  min-height: 52px;
}
.search-box .btn-search {
  flex: 0 0 auto;
  white-space: nowrap;
  writing-mode: horizontal-tb;
  min-width: 88px;
  padding: 12px 20px;
  font-size: 1.05rem;
  border-radius: 14px;
}
.field input, .field select, .field textarea {
  width: 100%;
  border: 2px solid #d9cbbd;
  background: var(--card);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--ink);
  min-height: 52px;
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  color: #ffe0b8;
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 8px;
}

/* 分类横滑大按钮 */
.cat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  padding: 2px 2px 14px;
  margin: 0 -4px 4px;
  scrollbar-width: none;
}
.cat-chips::-webkit-scrollbar { display: none; }
.cat-chip {
  flex: 0 0 auto;
  appearance: none;
  border: 2px solid #d9cbbd;
  background: var(--card);
  color: var(--ink);
  border-radius: 999px;
  padding: 12px 18px;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 48px;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.cat-chip em {
  font-style: normal;
  font-size: 0.95rem;
  font-weight: 700;
  background: #efe2d4;
  color: var(--muted);
  border-radius: 999px;
  padding: 2px 8px;
  min-width: 1.4em;
  text-align: center;
}
.cat-chip em.is-zero {
  opacity: 0.75;
}
.cat-chip.active {
  background: rgba(224,107,44,.16);
  border-color: var(--accent);
  color: var(--accent-2);
}
.cat-chip.active em {
  background: rgba(224,107,44,.18);
  color: var(--accent-2);
  opacity: 1;
}
.cat-chip.is-empty:not(.active) {
  opacity: 0.85;
}

/* 自定义下拉（保留兼容） */
.dd {
  position: relative;
  margin-bottom: 14px;
  z-index: 12;
}
.dd-trigger {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border: 2px solid #d9cbbd;
  border-radius: 14px;
  background: var(--card);
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.dd-trigger-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dd-arrow {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-right: 2.5px solid #5c4a3c;
  border-bottom: 2.5px solid #5c4a3c;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform .2s ease;
}
.dd-trigger.open .dd-arrow {
  transform: rotate(225deg) translate(-2px, -2px);
}
.dd-panel {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: 280px;
  overflow-y: auto;
  background: #fffdf9;
  border: 2px solid #d9cbbd;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(26, 18, 14, 0.22);
  padding: 6px;
}
.dd-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  text-align: left;
}
.dd-item:active,
.dd-item.active {
  background: rgba(224, 107, 44, 0.14);
}
.dd-item-ico {
  width: 1.8em;
  flex-shrink: 0;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  font-size: 1.1rem;
  line-height: 1;
}
.dd-item-name { flex: 1; }
.dd-check {
  color: var(--accent-2);
  font-weight: 700;
}

.dish-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.dish-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  animation: rise .45s ease both;
  align-items: stretch;
  min-width: 0;
}
.dish-card-simple {
  min-height: 0;
}
.dish-card-simple .dish-cover,
.dish-card .dish-cover {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
}
.dish-card-simple .dish-meta h3,
.dish-meta h3 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.dish-quick-add {
  appearance: none;
  border: 0;
  border-radius: 12px;
  background: rgba(224, 107, 44, 0.16);
  color: var(--accent-2);
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 8px;
  min-height: 44px;
  cursor: pointer;
  width: 100%;
}
.dish-quick-add:disabled {
  opacity: 0.55;
  cursor: wait;
}
.dish-quick-add.is-joined,
.dish-quick-add.is-joined:disabled {
  opacity: 1;
  background: #efe2d4;
  color: var(--muted);
  cursor: default;
}
.dish-card.is-joined {
  box-shadow: inset 0 0 0 2px rgba(224, 107, 44, 0.28);
}
.dish-quick-add:active {
  transform: scale(0.97);
}
.dish-meta p { display: none; }
.dish-card .tags { display: none; }
.dish-cover {
  position: relative;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  background: linear-gradient(145deg, #f0b27a, #c45c26 60%, #7a2e12);
  display: grid;
  place-items: center;
  color: #fff8f0;
  font-family: var(--font);
  font-size: 1.6rem;
  font-weight: 700;
  overflow: hidden;
  flex-shrink: 0;
}
.dish-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
}
.dish-cover:not(.is-loading) img {
  opacity: 1;
}
.img-spin {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 28px;
  height: 28px;
  margin: -14px 0 0 -14px;
  border: 3px solid rgba(255, 248, 240, 0.28);
  border-top-color: #fff8f0;
  border-radius: 50%;
  animation: img-spin .7s linear infinite;
  z-index: 2;
  pointer-events: none;
}
.dish-cover:not(.is-loading) .img-spin,
.menu-card-cover:not(.is-loading) .img-spin,
.detail-hero:not(.is-loading) .img-spin,
.detail-media:not(.is-loading) .img-spin,
.detail-media-cover:not(.is-loading) .img-spin,
.dish-cover.is-failed .img-spin,
.menu-card-cover.is-failed .img-spin,
.detail-media-cover.is-failed .img-spin {
  display: none;
}
@keyframes img-spin {
  to { transform: rotate(360deg); }
}
.dish-meta h3 {
  margin: 0 0 6px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
}
.dish-meta p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.55;
  font-weight: 500;
}
.tags { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tag {
  font-size: 0.85rem;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(224,107,44,.16);
  color: var(--accent-2);
}

.detail-title-block {
  display: none;
}
.detail-swipe-hint {
  display: none;
}
.detail-feed {
  position: relative;
  height: 100%;
  overflow: hidden;
  background: #120c09;
  touch-action: none;
  overscroll-behavior: none;
}
.detail-page {
  position: absolute;
  inset: 0;
  overflow: hidden;
  will-change: transform, opacity;
  touch-action: none;
  overscroll-behavior: none;
}
.detail-page.is-leaving-up {
  transform: translateY(-18%);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}
.detail-page.is-leaving-down {
  transform: translateY(18%);
  opacity: 0;
  transition: transform .24s ease, opacity .24s ease;
}
.detail-page.is-enter-from-bottom {
  animation: detail-enter-up .3s ease both;
}
.detail-page.is-enter-from-top {
  animation: detail-enter-down .3s ease both;
}
@keyframes detail-enter-up {
  from { transform: translateY(22%); opacity: 0.25; }
  to { transform: translateY(0); opacity: 1; }
}
@keyframes detail-enter-down {
  from { transform: translateY(-22%); opacity: 0.25; }
  to { transform: translateY(0); opacity: 1; }
}
.detail-media {
  position: absolute;
  inset: 0;
  border-radius: 0;
  overflow: hidden;
  width: 100%;
  height: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #120c09;
  box-shadow: none;
}
.detail-media-cover {
  aspect-ratio: auto;
}
.detail-media-cover .detail-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
}
.detail-media-cover:not(.is-loading) .detail-hero-img {
  opacity: 1;
}
.detail-media-empty {
  aspect-ratio: auto;
  color: #fff8f0;
  font-size: 2.4rem;
  font-weight: 700;
  background: linear-gradient(145deg, #f0b27a, #c45c26 55%, #5a2a14);
}
.detail-media-video {
  padding: 0;
  background: #000;
  container-type: size;
  container-name: detail-media;
}
.detail-media-video .video-embed {
  position: relative;
  flex: 0 0 auto;
  width: min(100cqw, calc(100cqh * 16 / 9));
  max-width: 100%;
  max-height: 100%;
  height: auto;
  margin: 0;
  padding-top: 0;
  aspect-ratio: 16 / 9;
  border-radius: 0;
  overflow: hidden;
  background: #000;
}
.detail-media-video .video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  border: 0;
}
.detail-media-local .video-embed-local,
.video-embed.video-embed-local {
  position: absolute;
  inset: 0;
  padding-top: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  background: #000;
  border-radius: 0;
  overflow: hidden;
}
.detail-local-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  object-position: center;
  background: #000;
  display: block;
  touch-action: manipulation;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 1;
}
.detail-local-video::-webkit-media-controls,
.detail-local-video::-webkit-media-controls-enclosure {
  display: none !important;
}
.video-embed-local.is-playing .detail-local-video,
.detail-local-video:not(.is-loading) {
  opacity: 1;
}
.video-embed-local.is-waiting .detail-local-video {
  opacity: 0;
  pointer-events: none;
}
.detail-video-cover {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: #120c09;
  display: grid;
  place-items: center;
  overflow: hidden;
  transition: opacity .25s ease;
  cursor: pointer;
}
.detail-video-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}
.detail-video-cover.is-empty {
  background: linear-gradient(145deg, #f0b27a, #c45c26 55%, #5a2a14);
}
.detail-video-cover.is-gone {
  opacity: 0;
  pointer-events: none;
}
.detail-video-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 8;
  width: 72px;
  height: 72px;
  border: 1px solid rgba(255, 248, 240, 0.28);
  border-radius: 50%;
  background: rgba(18, 12, 8, 0.42);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  appearance: none;
}
.detail-video-play:active {
  transform: translate(-50%, -50%) scale(0.96);
}
.detail-video-play-ico {
  width: 0;
  height: 0;
  margin-left: 4px;
  border-style: solid;
  border-width: 12px 0 12px 20px;
  border-color: transparent transparent transparent #fff8f0;
}
.detail-video-play.is-error {
  width: auto;
  height: auto;
  border-radius: 999px;
  padding: 12px 18px;
  color: #fff8f0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
}
.detail-video-play.is-error .detail-video-play-ico {
  display: none;
}
.detail-video-play[hidden] {
  display: none !important;
}
.detail-video-progress {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 78px;
  z-index: 9;
  padding: 14px 16px 8px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.28) 100%);
}
.detail-video-progress[hidden] {
  display: none !important;
}
.detail-video-progress-track {
  position: relative;
  pointer-events: auto;
  height: 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}
.detail-video-progress-track::before {
  content: "";
  display: block;
  width: 100%;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 248, 240, 0.28);
}
.detail-video-progress-fill {
  position: absolute;
  left: 0;
  top: 50%;
  width: 0%;
  height: 3px;
  margin-top: -1.5px;
  border-radius: 999px;
  background: #fff8f0;
  pointer-events: none;
}
.panel .video-embed-local {
  position: relative;
  width: 100%;
  height: auto;
  min-height: 220px;
  max-width: 100%;
  aspect-ratio: 16 / 9;
}
.panel .detail-video-progress {
  bottom: 0;
  padding-bottom: 10px;
}
.panel .detail-local-video {
  border-radius: 14px;
}
.detail-media-video .video-open-link,
.detail-media-video .btn {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 110px;
  z-index: 3;
  width: auto;
  margin: 0;
  box-sizing: border-box;
}
.detail-swipe-guide {
  position: fixed;
  left: 50%;
  top: 46%;
  transform: translate(-50%, -50%);
  z-index: 55;
  pointer-events: auto;
  animation: detail-guide-in .28s ease both;
}
.detail-swipe-guide.is-gone {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.96);
  transition: opacity .24s ease, transform .24s ease;
  pointer-events: none;
}
@keyframes detail-guide-in {
  from { opacity: 0; transform: translate(-50%, -46%) scale(0.94); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.detail-swipe-guide-card {
  min-width: 148px;
  padding: 18px 20px 16px;
  border-radius: 22px;
  background: rgba(12, 8, 6, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.38);
  color: #fff8f0;
  text-align: center;
}
.detail-swipe-ico {
  display: grid;
  justify-items: center;
  gap: 2px;
  margin-bottom: 10px;
  line-height: 1;
}
.detail-swipe-arrow {
  font-size: 1.35rem;
  font-weight: 700;
  opacity: 0.9;
}
.detail-swipe-arrow.is-up {
  animation: detail-swipe-up 1.1s ease-in-out infinite;
}
.detail-swipe-arrow.is-down {
  animation: detail-swipe-down 1.1s ease-in-out infinite;
}
.detail-swipe-finger {
  position: relative;
  width: 30px;
  height: 46px;
  border: 2px solid rgba(255, 248, 240, 0.92);
  border-radius: 16px;
  margin: 2px 0;
  animation: detail-swipe-pulse 1.1s ease-in-out infinite;
}
.detail-swipe-finger::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 10px;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 50%;
  background: rgba(255, 248, 240, 0.95);
  animation: detail-swipe-dot 1.1s ease-in-out infinite;
}
@keyframes detail-swipe-dot {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50% { transform: translateY(14px); opacity: 1; }
}
.detail-swipe-guide-card p {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.4;
}
@keyframes detail-swipe-up {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(-5px); opacity: 1; }
}
@keyframes detail-swipe-down {
  0%, 100% { transform: translateY(0); opacity: 0.45; }
  50% { transform: translateY(5px); opacity: 1; }
}
@keyframes detail-swipe-pulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.detail-side-actions {
  position: fixed;
  right: max(12px, calc((100vw - min(480px, 100vw)) / 2 + 12px));
  bottom: calc(108px + var(--safe-bottom));
  z-index: 46;
  display: flex;
  flex-direction: column;
  gap: 12px;
  pointer-events: auto;
}
#app.detail-info-open .detail-side-actions {
  visibility: hidden;
  pointer-events: none;
}
.detail-fab {
  appearance: none;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1px solid rgba(255, 232, 212, 0.28);
  background: rgba(20, 12, 8, 0.72);
  color: #fff8f0;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 1.15;
  text-align: center;
  transition: opacity .22s ease, transform .22s ease, visibility .22s ease;
}
.detail-fab.is-absent {
  opacity: 0;
  transform: scale(0.86) translateX(10px);
  visibility: hidden;
  pointer-events: none;
}
.detail-fab span {
  display: block;
  max-width: 2.4em;
}
.detail-fab:active {
  transform: scale(0.96);
}
.img-retry {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 4;
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: rgba(12, 8, 6, 0.72);
  color: #fff8f0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 10px 16px;
  cursor: pointer;
  backdrop-filter: blur(8px);
}
.dish-cover.is-failed,
.menu-card-cover.is-failed,
.detail-media-cover.is-failed {
  background: linear-gradient(145deg, #5a3a28, #2b1c14);
}
.detail-info-mask {
  position: fixed;
  inset: 0;
  z-index: 120;
  background: rgba(10, 6, 4, 0.72);
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 0;
}
.detail-info-mask[hidden] {
  display: none !important;
}
#app.detail-info-open .topbar {
  z-index: 30;
}
.detail-info-sheet {
  width: min(480px, 100%);
  height: 100%;
  max-height: 100dvh;
  background: var(--paper);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  animation: detail-info-in .22s ease;
}
@keyframes detail-info-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
.detail-info-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px calc(12px + env(safe-area-inset-top, 0px));
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--line);
  background: #fffdf9;
}
.detail-info-head h3 {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 700;
}
.detail-info-close {
  appearance: none;
  border: 0;
  border-radius: 999px;
  background: #efe2d4;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  min-height: 44px;
  padding: 0 18px;
  cursor: pointer;
}
.detail-info-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 16px 18px calc(24px + var(--safe-bottom));
  touch-action: pan-y;
  overscroll-behavior: contain;
}
.detail-info-body .ing-list,
.detail-info-body .step-list {
  margin: 0;
}
#app.detail-feed-open {
  position: relative;
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  padding-bottom: 0;
  display: block;
  overscroll-behavior: none;
  touch-action: none;
}
html.detail-feed-open,
html.detail-feed-open body {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  overscroll-behavior-y: none;
  touch-action: none;
}
#app.detail-feed-open .topbar {
  /* fixed：比 absolute 在 iOS/Chrome 上更稳定吃到 safe-area */
  position: fixed;
  left: 50%;
  right: auto;
  top: 0;
  width: min(480px, 100%);
  transform: translateX(-50%);
  z-index: 40;
  flex-shrink: 0;
  box-sizing: border-box;
  /* 旧 iOS */
  padding: calc(10px + constant(safe-area-inset-top)) 12px 36px;
  /* 标准：优先用浏览器真实 safe-area；仅已知坏浏览器由 JS 写入 --sat-fix */
  padding: calc(10px + max(var(--sat-fix, 0px), env(safe-area-inset-top, 0px))) 12px 36px;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.38) 48%, rgba(0, 0, 0, 0) 100%);
  backdrop-filter: none;
  pointer-events: none;
}
#app.detail-feed-open .topbar .icon-btn,
#app.detail-feed-open .topbar .topbar-page-title {
  pointer-events: auto;
}
#app.detail-feed-open .topbar-page-title {
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.7);
}
#app.detail-feed-open .icon-btn {
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
#app.detail-feed-open .icon-btn-home {
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(255, 232, 212, 0.35);
}
#app.detail-feed-open .site-copy,
#app.detail-feed-open .back-top {
  display: none !important;
}
#view.detail-feed-mode {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  z-index: auto;
}

.detail-hero {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  width: 100%;
  background: linear-gradient(145deg, #f0b27a, #c45c26 55%, #5a2a14);
  margin-bottom: 14px;
  box-shadow: var(--shadow);
}
.detail-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
}
.detail-hero:not(.is-loading) .detail-hero-img {
  opacity: 1;
}
.detail-hero-inner {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 20px;
  background: linear-gradient(transparent, rgba(20,10,6,.78));
  color: #fff8f0;
}
.detail-hero-inner h1 {
  margin: 0 0 8px;
  font-family: var(--font);
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1.3;
}
.detail-hero .tag {
  background: rgba(255, 248, 240, 0.92);
  color: #5a2a14;
  font-weight: 700;
}
.panel {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}
.panel h3 {
  margin: 0 0 12px;
  font-size: 1.15rem;
  font-family: var(--font);
  font-weight: 700;
}
.panel p { font-size: 1.05rem; line-height: 1.7; }
.ing-list, .step-list { margin: 0; padding: 0; list-style: none; }
.ing-list li, .step-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
}
.step-list li {
  display: grid;
  grid-template-columns: 32px 1fr;
  align-items: start;
}
.step-no {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(224,107,44,.18);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  font-weight: 700;
}
.sticky-cta {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 0;
  width: min(480px, 100%);
  z-index: 45;
  padding: 10px 16px calc(10px + var(--safe-bottom));
  margin: 0;
  background: rgba(26, 18, 14, 0.96);
  pointer-events: none;
}
.sticky-cta .btn,
.sticky-cta .pick-meals,
.sticky-cta .meal-tabs {
  pointer-events: auto;
}
.sticky-cta .btn {
  margin: 0;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
}
.sticky-cta-detail {
  display: grid;
  gap: 0;
  padding: 36px 16px calc(14px + var(--safe-bottom));
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 38%, rgba(0, 0, 0, 0.92) 100%);
  pointer-events: none;
  border: 0;
  box-shadow: none;
}
.meal-join-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  pointer-events: auto;
}
.meal-join-btn {
  appearance: none;
  border: 1px solid rgba(255, 232, 212, 0.22);
  border-radius: 14px;
  background: rgba(224, 107, 44, 0.92);
  color: #fff8f0;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  min-height: 48px;
  padding: 10px 6px;
  cursor: pointer;
}
.meal-join-btn.is-joined {
  background: #efe2d4;
  color: var(--ink);
  border-color: transparent;
}
.meal-join-btn:disabled {
  opacity: 0.65;
}
.sticky-cta-detail .sticky-meals,
.sticky-cta-detail .pick-meals {
  margin: 0;
}
.sticky-cta-detail .meal-tabs {
  background: rgba(255, 248, 240, 0.08);
  border-radius: 14px;
  padding: 4px;
}
#view:has(.sticky-cta) {
  padding-bottom: 96px;
}
#view.detail-feed-mode:has(.sticky-cta-detail),
#view:has(.sticky-cta-detail) {
  padding-bottom: 0;
}
#app:has(.sticky-cta) .site-copy {
  visibility: hidden;
  height: 0;
  margin: 0;
  overflow: hidden;
}

.btn-soft {
  background: #efe2d4;
  color: var(--ink);
}
.btn-soft:active { opacity: .9; }

.room-panel {
  text-align: center;
}
.room-panel-title {
  margin: 0 0 8px;
  font-size: 1.25rem;
  font-weight: 700;
  text-align: left;
}
.room-panel-desc {
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.65;
  font-weight: 500;
  text-align: left;
}
.room-meta {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 1.05rem;
  font-weight: 700;
}
.room-code-label {
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 1rem;
  font-weight: 700;
}
.room-code {
  font-family: var(--font);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  color: var(--accent-2);
  line-height: 1.3;
  margin: 0 0 10px;
  padding: 8px 0;
}
.room-nick {
  margin: 0 0 18px;
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 700;
}
.room-actions {
  display: grid;
  gap: 10px;
}
.room-actions .btn {
  width: 100%;
  margin: 0;
}
.room-actions-row {
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.room-actions-row .btn {
  padding: 12px 4px;
  font-size: 0.92rem;
  white-space: nowrap;
}

.menu-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.menu-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  padding: 10px;
  cursor: pointer;
  animation: rise .4s ease both;
  text-align: center;
}
.menu-card-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(145deg, #f0b27a, #c45c26 60%, #7a2e12);
  display: grid;
  place-items: center;
  color: #fff8f0;
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.menu-card-cover img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  opacity: 0;
  transition: opacity .25s ease;
}
.menu-card-cover:not(.is-loading) img {
  opacity: 1;
}
.menu-card h3 {
  margin: 0 0 8px;
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.35;
}
.menu-card-del-text {
  display: block;
  width: 100%;
  border: 0;
  background: #efe2d4;
  color: var(--muted);
  border-radius: 10px;
  padding: 10px 8px;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  min-height: 42px;
}
.menu-card-del {
  display: none;
}
.cook-mode .menu-card h3 { font-size: 1.2rem; }
.cook-mode .menu-card { padding: 12px; }

.family-bar {
  background: var(--card);
  border-radius: var(--radius);
  margin-bottom: 14px;
  overflow: hidden;
}
.family-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  font: inherit;
  text-align: left;
  cursor: pointer;
  min-height: 56px;
}
.family-toggle-main {
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.family-toggle-hint {
  flex-shrink: 0;
  color: var(--accent-2);
  font-weight: 700;
  font-size: 0.95rem;
}
.family-detail {
  padding: 0 18px 18px;
  border-top: 1px dashed var(--line);
}
.family-detail .room-nick {
  margin-bottom: 14px;
}
.family-detail .room-code {
  margin-bottom: 8px;
}

.share-box {
  width: 100%;
  min-height: 140px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 2px solid #d9cbbd;
  border-radius: 14px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.55;
  resize: vertical;
}
.success-modal { text-align: center; }
.success-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(31, 107, 58, 0.14);
  color: var(--ok);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
}
.success-modal h3 {
  margin-bottom: 8px;
}

.empty {
  grid-column: 1 / -1;
  text-align: center;
  color: #ffe0b8;
  padding: 40px 16px;
  font-size: 1.05rem;
  font-weight: 500;
}
.empty .big {
  font-family: var(--font);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
  color: #fff8f0;
}
.empty .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 160px;
}
.load-more-wrap {
  grid-column: 1 / -1;
  padding: 8px 0 18px;
}
.load-more-wrap .btn {
  min-height: 48px;
}
.muted-tip {
  text-align: center;
  color: rgba(255, 232, 212, 0.55);
  font-size: 0.9rem;
  padding: 8px 0 16px;
}
.dish-feedback {
  grid-column: 1 / -1;
  margin: 8px 0 6px;
  padding: 18px 16px 16px;
  border-radius: 18px;
  background: rgba(255, 248, 240, 0.08);
  border: 1px dashed rgba(255, 200, 150, 0.35);
  text-align: center;
}
.empty .dish-feedback {
  margin-top: 18px;
  text-align: left;
}
.dish-feedback-tip {
  margin: 0 0 10px;
  color: rgba(255, 232, 212, 0.55);
  font-size: 0.9rem;
}
.dish-feedback-title {
  margin: 0 0 6px;
  color: #fff3e6;
  font-size: 1.12rem;
  font-weight: 700;
}
.dish-feedback-desc {
  margin: 0 0 14px;
  color: rgba(255, 232, 212, 0.72);
  font-size: 0.95rem;
  line-height: 1.5;
}
.dish-feedback-btn {
  margin: 0;
  background: rgba(255, 248, 240, 0.92);
  color: var(--accent-2);
}
.empty p {
  margin: 8px 0 0;
  color: rgba(255, 232, 212, 0.72);
}
.empty-meal {
  background: rgba(255, 248, 240, 0.06);
  border: 1px dashed rgba(255, 224, 184, 0.35);
  border-radius: 20px;
  padding: 36px 18px;
}
.empty-meal-badge {
  display: inline-block;
  margin: 0 auto 12px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(224, 107, 44, 0.22);
  color: #ffe0b8;
  font-weight: 700;
  font-size: 1rem;
}
.empty-meal p {
  margin: 0 0 18px;
  color: #ffe0b8;
  font-size: 1.05rem;
  line-height: 1.6;
}
.empty-meal .btn {
  min-width: 200px;
  min-height: 54px;
  font-size: 1.1rem;
}

.back-top {
  position: fixed;
  right: 14px;
  bottom: calc(22px + var(--safe-bottom));
  z-index: 46;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 200, 150, 0.35);
  border-radius: 14px;
  background: rgba(224, 107, 44, 0.92);
  color: #fff8f0;
  font: inherit;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.28);
  transition: opacity .2s ease, transform .2s ease;
}
.back-top:active {
  transform: scale(0.94);
}
#app:has(.sticky-cta) .back-top {
  bottom: calc(88px + var(--safe-bottom));
}
#app:has(.sticky-cta-detail) .back-top {
  bottom: calc(92px + var(--safe-bottom));
}

#toast {
  position: fixed;
  left: 50%;
  top: 50%;
  bottom: auto;
  transform: translate(-50%, -50%);
  background: rgba(26,18,14,.94);
  color: #fff8f0;
  padding: 14px 22px;
  border-radius: 999px;
  font-size: 1.05rem;
  font-weight: 700;
  z-index: 100;
  max-width: 86vw;
  text-align: center;
  pointer-events: none;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.35);
}

.share-done-modal {
  text-align: center;
  background: linear-gradient(180deg, #fff8f0 0%, #fffdf9 40%);
  border: 1px solid rgba(224, 107, 44, 0.22);
  box-shadow: 0 16px 40px rgba(90, 40, 20, 0.28);
}
.share-done-ico {
  width: 56px;
  height: 56px;
  margin: 4px auto 14px;
  border-radius: 50%;
  background: rgba(224, 107, 44, 0.16);
  color: var(--accent-2);
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  font-weight: 700;
}
.share-done-modal h3 {
  margin: 0 0 8px;
  color: var(--accent-2);
}
.share-done-modal .modal-msg {
  color: var(--muted);
}
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 10, 6, 0.62);
  display: grid;
  place-items: center;
  z-index: 80;
  padding: 20px 16px;
}
.modal {
  width: min(480px, 100%);
  background: var(--paper);
  border-radius: 22px 22px 16px 16px;
  padding: 20px;
  animation: slideUp .25s ease;
}
.modal h3 {
  margin: 0 0 14px;
  font-family: var(--font);
  font-size: 1.35rem;
  font-weight: 700;
}
.modal .field label {
  color: var(--muted);
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

/* —— 不知道吃什么（点菜侧转盘） —— */
.surprise-entry {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 0 0 14px;
  padding: 14px 16px;
  border: 0;
  border-radius: 16px;
  text-align: left;
  cursor: pointer;
  color: #fff8f0;
  background:
    radial-gradient(ellipse at 90% 20%, rgba(255, 200, 140, 0.35), transparent 50%),
    linear-gradient(135deg, #c45c26 0%, #8a3d1c 100%);
  box-shadow: 0 8px 22px rgba(138, 61, 28, 0.28);
  font: inherit;
}
.surprise-entry-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.surprise-entry-text strong {
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.surprise-entry-text em {
  font-style: normal;
  font-size: 0.88rem;
  opacity: 0.88;
  font-weight: 500;
}
.surprise-entry-go {
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 248, 240, 0.22);
  border: 2px solid rgba(255, 248, 240, 0.55);
  font-weight: 800;
  font-size: 1.05rem;
}
.surprise-entry:active {
  transform: scale(0.985);
}

.surprise-page {
  padding-bottom: 88px;
}
.surprise-wheel-stage {
  position: relative;
  width: min(380px, 94vw);
  max-width: 100%;
  height: min(380px, 94vw);
  margin: 0 auto 18px;
  overflow: hidden;
}
.surprise-pointer {
  position: absolute;
  top: 0;
  left: 50%;
  z-index: 3;
  width: 0;
  height: 0;
  margin-left: -12px;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-top: 22px solid #fff8f0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}
.surprise-wheel {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  will-change: transform;
  overflow: hidden;
  box-shadow:
    0 0 0 6px rgba(255, 248, 240, 0.18),
    0 14px 32px rgba(0, 0, 0, 0.35);
}
.surprise-svg {
  display: block;
  width: 100%;
  height: 100%;
}
.surprise-labels {
  position: absolute;
  inset: 8px;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  border-radius: 50%;
}
.surprise-label {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 0;
  height: 0;
  will-change: transform;
}
.surprise-label-text {
  position: absolute;
  left: 0;
  top: 0;
  width: 5.4em;
  margin: 0;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.2;
  color: #fff8f0;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.45);
  letter-spacing: 0.02em;
  will-change: transform;
}
.surprise-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 72px;
  height: 72px;
  margin: -36px 0 0 -36px;
  border: 4px solid #fff8f0;
  border-radius: 50%;
  background: linear-gradient(160deg, #fff8f0, #f0d8c0);
  color: var(--accent-2);
  font: inherit;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(26, 18, 14, 0.35);
}
.surprise-hub:disabled {
  opacity: 0.55;
  cursor: default;
}
.surprise-hub:not(:disabled):active {
  transform: scale(0.96);
}
.surprise-picked-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 4px 0 8px;
  color: var(--paper);
  font-weight: 700;
  font-size: 0.95rem;
}
.surprise-clear {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 248, 240, 0.88);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  padding: 6px 4px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.surprise-clear:disabled {
  opacity: 0.45;
  cursor: default;
}
.surprise-picked {
  margin-bottom: 14px;
  min-height: 48px;
}
.surprise-picked-empty {
  padding: 14px 12px;
  text-align: center;
  border-radius: 14px;
  background: rgba(255, 248, 240, 0.1);
  color: rgba(255, 248, 240, 0.75);
}
.surprise-picked-grid {
  margin: 0;
}
.surprise-picked-grid .dish-card {
  cursor: pointer;
}
.surprise-picked-grid .surprise-picked-rm {
  background: #efe2d4;
  color: var(--accent-2);
}
.sticky-cta-surprise {
  background: linear-gradient(180deg, rgba(26, 18, 14, 0) 0%, rgba(26, 18, 14, 0.88) 35%, rgba(26, 18, 14, 0.98) 100%);
}
