/**
 * 早期变量默认值（与 src/styles-fluid.css 同步）
 * 运行时由 fluid-ui.js 覆盖。禁止 zoom。
 */

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  min-height: var(--vvh, 100dvh);
}

:root {
  --bp-phone: 600px;
  --bp-tablet: 900px;
  --shell-max: 440px;
  --app-shell-max: 440px;
  --row-h: 48px;
  --home-action-btn-h: 48px;
  --home-form-gap: 8px;
  --home-right-col: 6.75rem;
  --home-head-h: 120px;
  --home-calendar-h: 160px;
  --home-tab-pad: 72px;
  --sheet-max-h: 600px;
  --font-boost: 1;
  --user-font-scale: 1;
  --font-body: 1rem;
  --font-caption: 0.8125rem;
  --font-title: 1.2rem;
  --space-xs: 6px;
  --space-sm: 8px;
  --space-md: 14px;
  --space-lg: 20px;
  --tap-min: 44px;
  --vvh: 100dvh;
  --vvw: 100vw;
}

.theme-gentle .app-shell {
  width: min(100%, var(--shell-max));
  max-width: min(100%, var(--shell-max));
  margin-left: auto;
  margin-right: auto;
  padding-bottom: calc(var(--home-tab-pad) + env(safe-area-inset-bottom, 0px));
  box-sizing: border-box;
}

.theme-gentle .tab-bar.tab-bar-root,
.tab-bar.tab-bar-root,
.theme-gentle .site-icp-foot.site-icp-foot--dock,
.site-icp-foot.site-icp-foot--dock {
  width: min(100%, var(--shell-max));
  max-width: min(100%, var(--shell-max));
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

.theme-gentle .picker-sheet,
.theme-gentle .picker-sheet-place,
.theme-gentle .picker-sheet-bottom,
.theme-gentle .picker-sheet-time-bottom,
.theme-gentle .picker-sheet-time {
  max-width: min(100%, var(--shell-max));
  max-height: var(--sheet-max-h);
}

html.ui-large-text .theme-gentle .tab-bar,
html.ui-large-text .tab-bar.tab-bar-root {
  padding-top: var(--space-xs);
  padding-bottom: calc(var(--space-xs) + env(safe-area-inset-bottom, 0px));
}

html.ui-large-text .theme-gentle .tab-bar button,
html.ui-large-text .tab-bar.tab-bar-root button,
html.ui-large-text .tab-bar.tab-bar-root .tab-bar-slot {
  min-height: var(--tap-min);
  font-size: var(--font-caption);
  padding: var(--space-sm) 2px;
  white-space: normal;
  line-height: 1.2;
}

html.ui-scroll .theme-gentle .modal-mask,
html.ui-compact .theme-gentle .modal-mask,
html.ui-large-text .theme-gentle .modal-mask,
html.ui-short .theme-gentle .modal-mask {
  align-items: flex-start;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

html.ui-scroll .theme-gentle .modal,
html.ui-compact .theme-gentle .modal,
html.ui-large-text .theme-gentle .modal,
html.ui-short .theme-gentle .modal {
  margin: var(--space-md) auto;
  max-height: none;
}

.theme-gentle button,
.theme-gentle .btn-chin-primary,
.theme-gentle .btn-chin-inline,
.theme-gentle .home-row-action-btn {
  min-height: var(--tap-min);
}
