/* 2026-09-23: shared floating five-item navigation. */
.bottom-nav.bottom-nav-four {
  position: fixed;
  z-index: 70;
  right: max(12px, calc((100vw - 480px) / 2 + 12px));
  bottom: max(10px, env(safe-area-inset-bottom));
  left: max(12px, calc((100vw - 480px) / 2 + 12px));
  width: auto;
  height: 68px;
  transform: none;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  box-sizing: border-box;
  padding: 7px 8px 6px;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 34px;
  background:
    linear-gradient(105deg, rgba(255, 240, 220, .88), rgba(250, 246, 255, .9) 48%, rgba(238, 249, 236, .84));
  box-shadow:
    0 15px 38px rgba(54, 38, 66, .17),
    inset 0 1px 0 rgba(255, 255, 255, .8);
  -webkit-backdrop-filter: blur(20px) saturate(1.22);
  backdrop-filter: blur(20px) saturate(1.22);
}

.bottom-nav.bottom-nav-four::before,
.bottom-nav.bottom-nav-four::after {
  display: none;
}

.bottom-nav.bottom-nav-four .nav-item {
  position: relative;
  min-width: 0;
  min-height: 52px;
  margin: 0;
  padding: 3px 0 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 2px;
  transform: none;
  border: 0;
  border-radius: 24px;
  color: #756d79;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  font-weight: 560;
  line-height: 1.15;
  -webkit-tap-highlight-color: transparent;
}

.bottom-nav.bottom-nav-four .nav-item strong {
  width: 24px;
  height: 24px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 0;
  color: inherit;
  background: transparent;
  box-shadow: none;
  font-size: 0;
  line-height: 1;
}

.bottom-nav.bottom-nav-four .nav-item strong svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bottom-nav.bottom-nav-four .nav-item.active {
  color: #5b3ed6;
  background: rgba(108, 76, 241, .1);
}

.bottom-nav.bottom-nav-four .nav-item.active span {
  font-weight: 800;
}

.bottom-nav.bottom-nav-four .nav-add,
.bottom-nav.bottom-nav-four .nav-add.active {
  align-self: stretch;
  overflow: visible;
  color: #5f5368;
  background: transparent;
}

.bottom-nav.bottom-nav-four .nav-add strong {
  position: absolute;
  top: -19px;
  left: 50%;
  width: 54px;
  height: 54px;
  transform: translateX(-50%);
  border: 4px solid rgba(255, 255, 255, .96);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #ff9a47, #ff6f25);
  box-shadow:
    0 10px 22px rgba(241, 112, 35, .3),
    0 0 0 1px rgba(238, 105, 20, .08);
  font-size: 34px;
  font-weight: 300;
  line-height: 1;
}

.bottom-nav.bottom-nav-four .nav-add span {
  margin-top: 30px;
  color: #6d5a67;
}

.bottom-nav.bottom-nav-four .nav-add.active span {
  color: #5b3ed6;
}

.bottom-nav.bottom-nav-four .nav-item:focus-visible {
  outline: 3px solid rgba(108, 76, 241, .32);
  outline-offset: -2px;
}

.page:has(> .bottom-nav.bottom-nav-four) {
  padding-bottom: calc(116px + env(safe-area-inset-bottom));
}

/* Keep page-level action docks above the raised center button. */
body:has(.bottom-nav.bottom-nav-four) .library-menu-selection-bar,
body:has(.bottom-nav.bottom-nav-four) .library-bulk-bar,
body:has(.bottom-nav.bottom-nav-four) .order-batch-bar,
body:has(.bottom-nav.bottom-nav-four) .meal-order-dock,
body:has(.bottom-nav.bottom-nav-four) .meal-order-status,
body:has(.bottom-nav.bottom-nav-four) .meal-flow-page .flow-check-confirm,
body:has(.bottom-nav.bottom-nav-four) .sticky-actions {
  bottom: calc(104px + env(safe-area-inset-bottom));
}

.page:has(> .bottom-nav.bottom-nav-four):has(.sticky-actions) {
  padding-bottom: calc(218px + env(safe-area-inset-bottom));
}

@media (max-width: 767px), (hover: none) and (pointer: coarse) {
  body:has(input:focus, textarea:focus, select:focus, [contenteditable]:focus) .bottom-nav.bottom-nav-four {
    transform: translateY(calc(100% + 28px));
    opacity: 0;
    pointer-events: none;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bottom-nav.bottom-nav-four {
    transition: transform .2s ease, opacity .2s ease;
  }

  .bottom-nav.bottom-nav-four .nav-item {
    transition: color .16s ease, background-color .16s ease, transform .16s ease;
  }

  .bottom-nav.bottom-nav-four .nav-item:active {
    transform: scale(.96);
  }
}

/* 2026-09-30 Owner：导航条更矮；中间加号改成嵌在导航条里的正方形圆角按钮（不凸出、不带文字）。 */
.bottom-nav.bottom-nav-four {
  height: 58px;
  padding: 5px 8px;
  border-radius: 29px;
}
.bottom-nav.bottom-nav-four .nav-item {
  min-height: 46px;
  padding: 2px 0 1px;
  border-radius: 22px;
  font-size: 11px;
}
.bottom-nav.bottom-nav-four .nav-item strong svg {
  width: 21px;
  height: 21px;
}
.bottom-nav.bottom-nav-four .nav-item.nav-add {
  align-self: center;
  justify-content: center;
}
.bottom-nav.bottom-nav-four .nav-item.nav-add strong {
  position: static;
  top: auto;
  left: auto;
  width: 38px;
  height: 38px;
  margin: 0;
  transform: none;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  color: #fff;
  background: linear-gradient(145deg, #ff9a47, #ff6f25);
  box-shadow: 0 4px 10px rgba(241, 112, 35, .28);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
}
.bottom-nav.bottom-nav-four .nav-item.nav-add span {
  display: none;
}
.bottom-nav.bottom-nav-four .nav-item.nav-add:active strong {
  transform: scale(.94);
}

/* 2026-09-30 Owner：点餐页工具行压矮；搜索挪到「点餐 / 用餐安排 / 饭桌记录」一行右侧。 */
.library-context-tools.family-workspace-tools.is-compact { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; height: 44px; min-height: 0; padding: 0 !important; }
.library-context-tools.is-compact button { flex-direction: row; gap: 5px; font-size: 13px; line-height: 1; }
.library-context-tools.is-compact button + button::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: #eee6df; }
.library-context-tools.is-compact img { width: 18px; height: 18px; }
.family-workspace-tabs.menu-tabs { grid-template-columns: minmax(0, .72fr) minmax(0, 1fr) minmax(0, 1fr) auto; }
.family-workspace-tabs .family-workspace-actions { display: flex; align-items: center; gap: 5px; padding-left: 4px; }
.family-workspace-tabs .family-workspace-search { display: inline-flex; align-items: center; gap: 3px; height: 28px; padding: 0 9px; border: 0; border-radius: 999px; background: #f2eff6; color: #4a4350; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }
.family-workspace-tabs .family-workspace-search img { width: 14px; height: 14px; }
.family-workspace-tabs .family-workspace-search.is-open { background: #efe9ff; color: #5b3ed6; }
.family-workspace-tabs .family-workspace-actions .family-workspace-manage { height: 28px; padding: 0 2px 0 7px; border: 0; border-left: 1px solid #eee6df; background: none; color: #6c4cf1; font-size: 11px; font-weight: 750; white-space: nowrap; }

/* 2026-09-30 Owner：搜索从分栏行右侧的「搜索」按钮向左展开成输入框（盖住分栏）；输完点「搜索」，不搜就点「取消」。 */
.family-workspace-tabs .family-workspace-searchbar { position: absolute; inset: 0 8px 0 14px; z-index: 3; display: flex; align-items: center; gap: 6px; background: #faf8f5; animation: fdjSearchIn .22s ease-out; }
@keyframes fdjSearchIn { from { opacity: .2; clip-path: inset(0 0 0 76%); transform: translateX(8px); } to { opacity: 1; clip-path: inset(0 0 0 0); transform: none; } }
.family-workspace-tabs.is-searching { overflow: hidden; }
.family-workspace-tabs.is-searching > button.active::after { display: none; }
.family-searchbar-field { flex: 1; min-width: 0; display: flex; align-items: center; gap: 6px; height: 34px; margin: 0; padding: 0 5px 0 11px; border: 1px solid #6c4cf1; border-radius: 999px; background: #fff; box-sizing: border-box; }
.family-searchbar-field img { width: 15px; height: 15px; opacity: .75; }
.family-searchbar-field input { flex: 1; min-width: 0; height: 32px; border: 0; outline: 0; background: none; font: inherit; font-size: 14px; color: #28252d; }
.family-searchbar-field input::-webkit-search-cancel-button { display: none; }
.family-searchbar-clear { flex: none; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 50%; background: #e9e4ef; color: #766d7f; font-size: 13px; line-height: 20px; cursor: pointer; }
.family-searchbar-submit { flex: none; height: 34px; padding: 0 13px; border: 0; border-radius: 999px; background: #6c4cf1; color: #fff; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.family-searchbar-cancel { flex: none; padding: 0 2px; border: 0; background: none; color: #6b6272; font: inherit; font-size: 13px; cursor: pointer; }
.library-search-hint { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; color: #6b6272; font-size: 12px; }
.library-search-hint .library-search-count { margin-left: auto; color: #5b3ed6; }

/* 2026-09-30 Owner：导航条做成半透明毛玻璃；不支持模糊的浏览器保持原来较实的底色。 */
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .bottom-nav.bottom-nav-four {
    border-color: rgba(255, 255, 255, .72);
    background: linear-gradient(105deg, rgba(255, 246, 234, .36), rgba(255, 250, 244, .32) 48%, rgba(244, 250, 240, .34));
    -webkit-backdrop-filter: blur(11px) saturate(1.7);
    backdrop-filter: blur(11px) saturate(1.7);
    box-shadow: 0 10px 26px rgba(54, 38, 66, .14), inset 0 1px 0 rgba(255, 255, 255, .75);
  }
}

.library-dish-signal.is-want { color: #c0561a; font-weight: 600; }
.library-dish-signal.is-draft { color: #b4541a; }
.library-dish-signal.is-old { color: #8a6a55; }
.library-order-count { flex: none; padding: 2px 7px; border-radius: 999px; background: #fff3e8; color: #c0561a; font-size: 11px; font-weight: 600; white-space: nowrap; }

/* 2026-10 Owner 反馈：点餐页（固定高度的三栏工作区）列表停在导航上方，导航上下露出一整块底色，像被遮住。
   工作区一直铺到屏幕底，内容滚到毛玻璃导航下面；最后一项靠面板底部留白停在导航上方。 */
.family-workspace-shell.page:has(> .bottom-nav.bottom-nav-four),
.family-workspace-shell.page { padding-bottom: 0; }
.family-workspace-shell .family-workspace-panel,
.family-workspace-shell .family-workspace-panel.meal-flow-page { padding-bottom: calc(108px + env(safe-area-inset-bottom)); scroll-padding-bottom: calc(108px + env(safe-area-inset-bottom)); }

/* 10/26 18:11 Owner 真机：首图颜色深的时候，导航条上的字看不清——底色加实（还是毛玻璃），字加深一点（和小程序同一套） */
.bottom-nav.bottom-nav-four { border-color: rgba(255, 255, 255, .9); background: linear-gradient(105deg, rgba(255, 247, 238, .9), rgba(255, 252, 248, .88) 48%, rgba(246, 251, 243, .9)); }
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .bottom-nav.bottom-nav-four {
    border-color: rgba(255, 255, 255, .9);
    background: linear-gradient(105deg, rgba(255, 247, 238, .86), rgba(255, 252, 248, .84) 48%, rgba(246, 251, 243, .86));
    -webkit-backdrop-filter: blur(12px) saturate(1.4);
    backdrop-filter: blur(12px) saturate(1.4);
    box-shadow: 0 8px 22px rgba(54, 38, 66, .18), inset 0 1px 0 rgba(255, 255, 255, .85);
  }
}
.bottom-nav.bottom-nav-four .nav-item:not(.active) { color: #3d3544; font-weight: 650; }
