/* 食刻后台：Material Design 3（Beer CSS）+ 少量业务样式 */
:root {
  --font: "MiSans", "HarmonyOS Sans SC", "PingFang SC", "Noto Sans CJK SC",
    "Noto Sans SC", "Source Han Sans SC", "Microsoft YaHei", system-ui,
    -apple-system, "Segoe UI", Roboto, sans-serif;
}
body {
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body.light {
  --primary: #8b5000;
  --on-primary: #ffffff;
  --primary-container: #ffdcbe;
  --on-primary-container: #2c1600;
  --secondary: #755846;
  --on-secondary: #ffffff;
  --secondary-container: #ffdbc8;
  --on-secondary-container: #2b160a;
  --tertiary: #4c662b;
  --on-tertiary: #ffffff;
  --tertiary-container: #cdea9f;
  --on-tertiary-container: #102000;
  --error: #ba1a1a;
  --on-error: #ffffff;
  --error-container: #ffdad6;
  --on-error-container: #410002;
  --background: #fff8f4;
  --on-background: #221a14;
  --surface: #fff8f4;
  --on-surface: #221a14;
  --surface-variant: #f1dfd1;
  --on-surface-variant: #52443a;
  --outline: #857469;
  --outline-variant: #d7c3b5;
  --surface-dim: #e3d7cd;
  --surface-bright: #fff8f4;
  --surface-container-lowest: #ffffff;
  --surface-container-low: #fff2e9;
  --surface-container: #fcecdf;
  --surface-container-high: #f6e6d9;
  --surface-container-highest: #f1dfd1;
  --inverse-surface: #392e26;
  --inverse-on-surface: #ffede1;
  --inverse-primary: #ffb86f;
  --shadow: #000000;
  --scrim: #000000;
  /* isolation 让 fixed 伪元素盖在 body 背景色之上、内容之下 */
  isolation: isolate;
}
/* 背景渐变放在固定定位伪元素上：只绘制一次、独立合成层，
   滚动与切页动画不再整页重绘（替换 background-attachment: fixed） */
body.light::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(1000px 620px at 0% -5%, rgba(255, 205, 160, .55), transparent 62%),
    radial-gradient(1100px 650px at 100% 0%, rgba(199, 232, 170, .45), transparent 62%),
    radial-gradient(900px 620px at 55% 110%, rgba(255, 228, 208, .5), transparent 62%),
    linear-gradient(135deg, #fffaf5 0%, #fdf5ec 48%, #f7f7ef 100%);
}

/* ---------- 布局 ---------- */
.fd-main {
  max-inline-size: 90rem !important;
  margin-inline: auto;
  padding: 1rem clamp(.75rem, 2.5vw, 2rem) 2.5rem;
}
.fd-zero { margin: 0 !important; }
.fd-ellipsis {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

nav.left {
  background: linear-gradient(180deg, var(--surface-container-low) 0%, var(--surface-container) 100%) !important;
  padding-inline: .5rem !important;
  inline-size: var(--fd-side-width, 15rem) !important;
  min-inline-size: var(--fd-side-width, 15rem) !important;
  max-inline-size: var(--fd-side-width, 15rem) !important;
  border-inline-end: 0;
  box-shadow: 10px 0 34px -32px rgba(57, 46, 38, .45);
}
@media (min-width: 993px) {
  nav.left {
    block-size: calc(100dvh - 1rem) !important;
    margin-block-end: 1rem;
    border-end-start-radius: 1.5rem;
    border-end-end-radius: 1.5rem;
  }
}
.fd-side-resizer {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  inline-size: 7px;
  cursor: col-resize;
  touch-action: none;
  z-index: 20;
}
.fd-side-resizer::after {
  content: "";
  position: absolute;
  inset-block: 38%;
  inset-inline-end: 1px;
  inline-size: 2px;
  border-radius: 2px;
  background: var(--outline-variant);
  opacity: .55;
  transition: background-color .2s ease, opacity .2s ease, inline-size .2s ease;
}
.fd-side-resizer:hover::after,
.fd-side-resizer:focus-visible::after {
  inline-size: 3px;
  background: var(--primary);
  opacity: 1;
}
.fd-resizing, .fd-resizing * { cursor: col-resize !important; user-select: none !important; }

.fd-side-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .2rem;
  inline-size: 100%;
  padding-block: 1.4rem .9rem;
  margin: 0 0 .8rem;
  text-align: center;
}
.fd-side-brand h4 {
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC",
    "Song", "STZhongsong", "STKaiti", "KaiTi", "SimSun", serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .3em;
  text-indent: .3em; /* 抵消末字间距，保持视觉居中 */
  color: var(--primary);
}
.fd-login-brand h4 {
  font-family: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC",
    "Song", "STZhongsong", "STKaiti", "KaiTi", "SimSun", serif;
  letter-spacing: .18em;
}

.fd-side-nav {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  inline-size: 100%;
  padding: .25rem;
  border: 0;
  border-radius: 1rem;
  background: var(--surface-container);
  box-shadow: 0 10px 24px -22px rgba(57, 46, 38, .5);
  position: relative;
}
/* 侧栏滑动高亮：由 JS 定位到当前项，切换时弹性滑动 */
.fd-side-pill {
  position: absolute;
  inset-inline: .25rem;
  top: 0;
  block-size: 3.25rem;
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--primary-container), #ffefdf);
  box-shadow: 0 8px 18px -16px rgba(139, 80, 0, .6);
  opacity: 0;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.fd-side-pill.fd-pill-on { opacity: 1; }
nav.left .fd-side-nav a:not(.button, .chip) { position: relative; z-index: 1; }
body.fd-pill-ready nav.left.max .fd-side-nav a.active:not(.button, .chip) {
  background: transparent !important;
  box-shadow: none !important;
}
.fd-side-nav a:not(.button, .chip) {
  inline-size: 100% !important;
  min-block-size: 3.25rem;
  padding-inline: 1rem;
  border-radius: 1.5rem;
  font-size: .95rem !important;
  justify-content: flex-start !important;
}
nav.left a i { font-size: 1.4rem; }
nav.left.max .fd-side-nav a.active:not(.button, .chip) {
  background: linear-gradient(135deg, var(--primary-container), #ffefdf) !important;
  color: var(--on-primary-container) !important;
  box-shadow: 0 8px 18px -16px rgba(139, 80, 0, .6);
}

.fd-side-account {
  inline-size: 100%;
  padding: .8rem;
  border: 0;
  border-radius: 1rem;
  background: var(--surface-container-high);
  box-shadow: 0 10px 24px -22px rgba(57, 46, 38, .45);
}
.fd-side-account button.border {
  border: 0 !important;
  background: var(--surface-container-low) !important;
  color: var(--on-surface) !important;
}
.fd-hidden { display: none !important; }
.fd-side-account .fd-user-row { margin: 0 0 .65rem; }
.fd-side-account form { margin: 0; }
.fd-side-account .chip {
  flex: none;
  padding-inline: .5rem;
  font-size: .68rem;
}

.fd-user-row { margin-block: .5rem 1rem; }
.fd-user-text { min-inline-size: 0; overflow: hidden; }
.fd-user-text .small-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fd-full { inline-size: 100%; box-sizing: border-box; }

nav.bottom { display: none; }

.fd-page-head {
  position: relative;
  margin-block: .5rem 1.1rem;
  padding: .25rem 0 .5rem;
  gap: 1rem;
  white-space: normal;
}
.fd-page-title { min-inline-size: 0; max-inline-size: 100%; white-space: normal; }

.fd-week-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
  margin-block: -.15rem 1.15rem;
}
.fd-week-caption {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  margin-inline-end: .2rem;
  font-size: .8rem;
  color: var(--on-surface-variant);
}
.fd-week-caption i { font-size: 1.15rem; }
.fd-week-bar .chip { margin: 0; }
.fd-week-bar .chip i { font-size: 1rem; }
.fd-week-bar .chip.primary-container {
  box-shadow: 0 8px 18px -16px rgba(139, 80, 0, .55);
}

.fd-week-card {
  display: block;
  padding: 1rem 1.1rem;
  border-radius: 1.1rem;
  background: #fffaf6;
  color: inherit;
  text-decoration: none;
  box-shadow:
    0 18px 40px -38px rgba(57, 46, 38, .55),
    0 1px 2px rgba(57, 46, 38, .03);
  transition: transform .3s cubic-bezier(.22, .8, .26, .99);
}
.fd-week-card:hover {
  transform: translateY(-2px);
}
.fd-week-card.active {
  background: linear-gradient(135deg, var(--primary-container), #fff3e8);
}
.fd-week-card-stats {
  margin-block-start: .8rem;
  gap: 1rem;
  color: var(--on-surface-variant);
  font-size: .75rem;
}
.fd-week-card-stats span {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  white-space: nowrap;
}
.fd-week-card-stats i { font-size: 1rem; }

.fd-mobile-bar { display: none; }
.fd-page-actions { gap: .5rem; }

/* ---------- 字体层级 ---------- */
b, strong { font-weight: 650; }
.fd-page-title h4 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -.03em;
}
.fd-page-title > .small-text:first-child {
  color: var(--primary) !important;
  font-weight: 600;
  letter-spacing: .1em;
}
.fd-kpi-grid h3 {
  font-size: 2.15rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
}
.fd-stat-strip h5 {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fd-main h5,
.fd-main h6 { font-weight: 650; letter-spacing: .005em; }
/* 卡片标题与副标题同一行：如「周内记录趋势 所选周每天的打饭记录数量」；
   手机窄屏仍上下两行避免溢出；长说明用 p 标签书写，不受影响 */
@media (min-width: 601px) {
  .fd-main h6.fd-zero:has(+ div.small-text.secondary-text) { display: inline; }
  .fd-main h6.fd-zero + div.small-text.secondary-text {
    display: inline;
    margin-inline-start: .55rem;
    white-space: nowrap;
  }
}
.fd-main th {
  color: var(--on-surface-variant);
  font-weight: 650;
  letter-spacing: .02em;
}
.fd-main td { font-variant-numeric: tabular-nums; }
.fd-main .bold { font-weight: 650; }
.fd-main .fd-review strong { font-weight: 650; }
.chip { font-weight: 600; }
.button,
button { font-weight: 600; }
nav.left .fd-side-nav a:not(.button, .chip) { font-weight: 500; }
nav.left .fd-side-nav a.active:not(.button, .chip) { font-weight: 650; }
.fd-week-card h6 { font-weight: 650; }
.fd-week-card-stats span { font-weight: 500; }

/* ---------- 卡片与文本 ---------- */
.fd-main article.border,
.fd-login-main article.border {
  border-color: transparent !important;
  border-radius: 1.1rem;
  background: #fffaf6;
  box-shadow:
    0 18px 40px -38px rgba(57, 46, 38, .55),
    0 1px 2px rgba(57, 46, 38, .03);
}
.fd-main article.border:hover {
  border-color: transparent !important;
}

.fd-main .field.fill {
  border-radius: .8rem;
  overflow: hidden;
}
.fd-main .field.fill > input,
.fd-main .field.fill > select,
.fd-main .field.fill > textarea {
  background: var(--surface-container);
  border: 0;
}
.fd-main .field.fill:focus-within > input,
.fd-main .field.fill:focus-within > select,
.fd-main .field.fill:focus-within > textarea {
  background: var(--surface-container-high);
}

.fd-main .button.border,
.fd-main button.border {
  border-color: transparent !important;
  background: var(--surface-container-high) !important;
  color: var(--on-surface) !important;
}
.fd-main .button.border:hover,
.fd-main button.border:hover {
  background: var(--surface-container-highest) !important;
}
.fd-main .button.border.error-text,
.fd-main button.border.error-text { color: var(--error) !important; }

.fd-main form > .field + button,
.fd-main form > .field + .button,
.fd-login-main form > .field + button,
.fd-login-main form > .field + .button {
  margin-block-start: 1.25rem;
}

.fd-main table.border > thead > tr > th,
.fd-main table.border > tbody > tr > td {
  border-color: transparent !important;
}
.fd-main table.border > thead > tr > th {
  color: var(--on-surface-variant);
  font-weight: 600;
}
.fd-main table.border > tbody > tr:nth-child(even) {
  background: var(--surface-container);
}
/* 悬停高亮：优先级需高于斑马纹（否则偶数行无反馈），颜色用暖桃色与条纹明显区分 */
.fd-main table.border > tbody > tr:hover,
.fd-main table.border > tbody > tr:nth-child(even):hover {
  background-color: #ffe3c2;
}
.fd-inline-input {
  border: 0;
  background: var(--surface-container);
}

/* ---------- 仪表盘 ---------- */
.fd-kpi-grid article { block-size: 100%; box-sizing: border-box; }
.fd-card-fill { block-size: 100%; box-sizing: border-box; }

.fd-stat-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  border-radius: .9rem;
  font-size: 1.4rem;
  flex: none;
}

.fd-stat-strip { margin-block: 1rem; }

.fd-bars {
  display: flex;
  align-items: flex-end;
  gap: .75rem;
  block-size: 13rem;
  margin-block-start: 1.5rem;
}
.fd-bar-col {
  flex: 1 1 0;
  min-inline-size: 0;
  block-size: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: .35rem;
}
.fd-bar-value { font-size: .7rem; color: var(--on-surface-variant); }
.fd-bar-track {
  inline-size: 100%;
  max-inline-size: 2.25rem;
  block-size: calc(100% - 2.5rem);
  margin-inline: auto;
  border-radius: 1rem;
  background: var(--surface-container-high);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.fd-bar-fill {
  inline-size: 100%;
  min-block-size: 2px;
  border-radius: 1rem;
  background: var(--primary);
}
.fd-bar-fill.is-empty { background: transparent; }
.fd-bar-label {
  font-size: .68rem;
  color: var(--on-surface-variant);
  white-space: nowrap;
}
.fd-bars-sm { block-size: 10rem; gap: .25rem; }
.fd-bars-sm .fd-bar-track { max-inline-size: 1.4rem; }
.fd-bars-sm .fd-bar-label { font-size: .58rem; }

.fd-dot {
  display: inline-block;
  inline-size: .65rem;
  block-size: .65rem;
  border-radius: 50%;
  margin-inline-end: .5rem;
  flex: none;
}
.fd-primary { background: var(--primary); }
.fd-secondary { background: var(--secondary); }
.fd-tertiary { background: var(--tertiary); }

.fd-goal-row { margin-block-start: 1rem; padding-inline-start: .15rem; }
progress { block-size: .35rem; margin-block: .35rem 0; margin-inline: 0; }
.fd-progress-primary { color: var(--primary); }
.fd-progress-secondary { color: var(--secondary); }
.fd-progress-tertiary { color: var(--tertiary); }

/* ---------- 列表 ---------- */
.fd-review {
  padding: .8rem .75rem;
  margin-inline: -.25rem;
  border: 0;
  border-radius: .85rem;
  transition: background-color .25s ease;
}
.fd-review + .fd-review { margin-block-start: .2rem; }
.fd-review:hover { background: var(--surface-container-low); }
.fd-review p { margin-block: .25rem 0; }

.fd-pre {
  white-space: pre-wrap;
  line-height: 1.75;
  margin-block: 1rem 0;
}

.fd-row-actions { gap: .5rem; flex-wrap: wrap; margin-block-start: 1rem; }
.fd-row-actions form { margin: 0; }

.fd-nowrap th, .fd-nowrap td { white-space: nowrap; }
.fd-main th, .fd-main td { white-space: nowrap; }
.fd-main th, .fd-main td { vertical-align: middle; }
.fd-main h4, .fd-main h5, .fd-main h6 { overflow-wrap: anywhere; }
.chip, button, .button, nav.bottom a span { white-space: nowrap; }
button, .button {
  box-sizing: border-box;
  writing-mode: horizontal-tb;
  white-space: nowrap !important;
}
.fd-main button > span,
.fd-main .button > span { white-space: nowrap !important; }

.fd-align-left { text-align: left !important; }
.fd-align-center { text-align: center !important; }
.fd-align-end { text-align: end !important; }
.fd-num { font-variant-numeric: tabular-nums; }

.fd-filter-actions { gap: .5rem; flex-wrap: wrap; }
.fd-filter-actions > button,
.fd-filter-actions > .button {
  flex: 1 1 auto;
  min-inline-size: max-content;
  justify-content: center;
}
.fd-filter-actions > button > span,
.fd-filter-actions > .button > span { white-space: nowrap; }

.fd-usercell.row {
  min-inline-size: 0;
  color: inherit;
  text-decoration: none;
  justify-content: flex-start;
}
.fd-usercell-text { min-inline-size: 0; }
.fd-usercell-text .bold {
  display: block;
  max-inline-size: 12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.fd-mobile-record { display: none; }
.fd-dish-portion-summary {
  display: none;
  margin-block-start: .2rem;
  white-space: normal;
}

.fd-empty {
  padding: 2.25rem 1rem;
  text-align: center;
  color: var(--on-surface-variant);
}
.fd-empty > i {
  /* Beer 的 i 用 --_size 同时驱动字号与盒子宽高，且 overflow:hidden。
     只改 font-size 会让字形超出 1.5rem 盒子被裁切，必须同步改 --_size。 */
  --_size: 2.5rem;
  display: block;
  margin-inline: auto;
  color: var(--outline);
  margin-block-end: .5rem;
}
.fd-empty h6 { margin-block: .25rem; }
.fd-empty p { margin-block: .25rem 0; }

.fd-pager { margin-block-start: 1rem; gap: .5rem; flex-wrap: wrap; }
.fd-pager .chip { margin: 0 .25rem; }

/* ---------- 表单 ---------- */
.fd-detail-table td { white-space: normal; }

.fd-form-card {
  max-inline-size: 60rem;
  margin-inline: auto;
}
.fd-profile-row { align-items: flex-start !important; }
.fd-profile-row > .max { min-inline-size: 0; }
.fd-profile-today { text-align: end; }
.fd-form-actions {
  margin-block-start: 2rem;
  gap: .75rem;
  flex-wrap: wrap;
}
.fd-form-card form > h6 { margin-block: 1.5rem .5rem; }
.fd-form-card form > h6:first-of-type { margin-block-start: 0; }

.fd-inline-form {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin: 0;
  white-space: nowrap;
}
.fd-inline-input {
  inline-size: 6.5rem;
  block-size: 2rem;
  padding-inline: .7rem;
  border: 1px solid var(--outline);
  border-radius: .5rem;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-size: .8rem;
  box-sizing: border-box;
}
.fd-inline-input:focus {
  outline: 2px solid var(--primary);
  outline-offset: 1px;
}

/* 账号管理：宽度足够时才并排，避免表单与表格互相挤压 */
.fd-staff-grid > div { grid-column: 1 / -1; }
.fd-key-status {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-block-size: 1.25rem;
  margin: .15rem 0 .9rem;
}
.fd-key-status i { font-size: 1rem; flex: none; }
.fd-key-status span { min-inline-size: 0; }
.fd-key-ok { color: var(--primary); }
.fd-key-value {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  letter-spacing: .02em;
}
.fd-staff-ai form > button { margin-block-start: .35rem; }
.fd-more-btn { margin-block-start: .8rem; }
@media (min-width: 1200px) {
  .fd-staff-grid {
    grid-template-columns: minmax(0, 7fr) minmax(19rem, 5fr);
    align-items: start;
  }
  .fd-staff-form { grid-column: 1 !important; grid-row: 1; }
  .fd-staff-list { grid-column: 1 !important; grid-row: 2; }
  .fd-staff-ai { grid-column: 2 !important; grid-row: 1 / span 2; }
}

/* ---------- 头像与登录 ---------- */
.fd-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border-radius: 50%;
  background: var(--primary-container);
  color: var(--on-primary-container);
  font-weight: 600;
  flex: none;
}
.fd-avatar-lg {
  inline-size: 4rem;
  block-size: 4rem;
  font-size: 1.5rem;
}
.fd-avatar-icon i { font-size: 1.3rem; }

.fd-login-main {
  max-inline-size: 26rem !important;
  margin-inline: auto;
  padding-block: 8vh 2rem;
}
.fd-login-brand { margin-block-end: 2rem; }
.fd-login-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 3.75rem;
  block-size: 3.75rem;
  border-radius: 1.2rem;
  background: var(--primary);
  color: var(--on-primary);
  font-size: 1.6rem;
  font-weight: 700;
  box-shadow: var(--elevate1);
  margin-block-end: .75rem;
}
.fd-error-icon { --_size: 4rem; }
.fd-foot { margin-block: 2.5rem 1rem; }

/* ---------- MD3 动效（只动 transform/opacity，走合成器） ---------- */
@view-transition { navigation: auto; }

@keyframes fd-page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fd-content-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fd-content-right {
  from { opacity: 0; transform: translateX(22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fd-content-left {
  from { opacity: 0; transform: translateX(-22px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes fd-block-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fd-bar-grow {
  from { transform: scaleY(.02); }
  to { transform: scaleY(1); }
}
@keyframes fd-progress-grow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}
@keyframes fd-ghost-out {
  0% { opacity: 1; transform: translate(0, 0); }
  28% { opacity: .5; }
  60% { opacity: 0; }
  100% { opacity: 0; transform: translate(var(--fd-ghost-x, 0), var(--fd-ghost-y, -18px)); }
}
@keyframes fd-flash-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fd-flash-out {
  to { opacity: 0; transform: translateY(-8px); }
}
@keyframes fd-vt-out {
  to { opacity: 0; }
}
@keyframes fd-vt-in {
  from { opacity: 0; }
}

/* 旧页面离场幽灵层：SPA 切页时旧内容原地滑出淡去，与新页面形成双向过渡 */
.fd-page-ghost {
  position: fixed;
  z-index: 6;
  margin: 0 !important;
  overflow: hidden;
  pointer-events: none;
}
.fd-page-ghost * { animation: none !important; }

.fd-flash.fd-flash-out { animation: fd-flash-out .35s ease both; }

@media (prefers-reduced-motion: no-preference) {
  .fd-main, .fd-login-main { animation: fd-page-in .5s cubic-bezier(.22, .8, .26, .99) backwards; }

  .fd-main article.border {
    transition: transform .3s cubic-bezier(.22, .8, .26, .99), background-color .25s ease;
  }
  .fd-kpi-grid article.border:hover { transform: translateY(-3px); }
  .fd-kpi-grid article .fd-stat-icon { transition: transform .35s cubic-bezier(.34, 1.45, .44, 1); }
  .fd-kpi-grid article:hover .fd-stat-icon { transform: scale(1.1) rotate(-4deg); }

  .fd-week-card:hover { transform: translateY(-3px); }

  nav.left a, nav.bottom a { transition: background-color .25s ease, color .25s ease; }
  nav.left a i, nav.bottom a i {
    transition: background-color .3s ease, color .3s ease, padding .3s ease;
  }
  .fd-side-pill { transition: transform .5s cubic-bezier(.3, 1.25, .35, 1), opacity .25s ease; }

  /* 页面进入：旧页面先滑出（60ms 内消失），新页面紧随滑入，严格先后不叠字 */
  .fd-content-enter { animation: fd-content-up .5s cubic-bezier(.22, .8, .26, .99) .07s backwards; }
  .fd-content-enter.fd-from-right { animation-name: fd-content-right; }
  .fd-content-enter.fd-from-left { animation-name: fd-content-left; }
  /* 首屏内容自上而下快速递进：0.04s 一档，0.6s 内全部到位，不迟钝 */
  .fd-content-enter > .grid,
  .fd-content-enter > article.border,
  .fd-content-enter > .fd-week-bar {
    animation: fd-block-in .38s cubic-bezier(.22, .8, .26, .99) backwards;
  }
  main.fd-content-enter > :nth-child(1) { animation-delay: .05s; }
  main.fd-content-enter > :nth-child(2) { animation-delay: .1s; }
  main.fd-content-enter > :nth-child(3) { animation-delay: .15s; }
  main.fd-content-enter > :nth-child(4) { animation-delay: .2s; }
  main.fd-content-enter > :nth-child(5) { animation-delay: .25s; }
  main.fd-content-enter > :nth-child(6) { animation-delay: .3s; }
  main.fd-content-enter > :nth-child(7) { animation-delay: .35s; }
  main.fd-content-enter > :nth-child(n+8) { animation-delay: .4s; }
  /* 周标签紧跟其所在区块快速浮现 */
  .fd-week-bar > * { animation: fd-block-in .28s cubic-bezier(.22, .8, .26, .99) backwards; }
  .fd-week-bar > :nth-child(2) { animation-delay: .02s; }
  .fd-week-bar > :nth-child(3) { animation-delay: .04s; }
  .fd-week-bar > :nth-child(4) { animation-delay: .06s; }
  .fd-week-bar > :nth-child(5) { animation-delay: .08s; }
  .fd-week-bar > :nth-child(6) { animation-delay: .1s; }
  .fd-week-bar > :nth-child(7) { animation-delay: .12s; }
  .fd-week-bar > :nth-child(n+8) { animation-delay: .14s; }
  /* 旧页面滑出方向：线性时间轴，60ms 内完全透明（见 fd-ghost-out 关键帧） */
  .fd-page-ghost { animation: fd-ghost-out .1s linear both; }
  .fd-ghost-to-left { --fd-ghost-x: -34px; --fd-ghost-y: 0; }
  .fd-ghost-to-right { --fd-ghost-x: 34px; --fd-ghost-y: 0; }
  .fd-ghost-to-up { --fd-ghost-x: 0; --fd-ghost-y: -18px; }

  /* 柱状图从底部生长 */
  .fd-bar-fill {
    transform-origin: bottom;
    animation: fd-bar-grow 1.3s cubic-bezier(.22, .8, .26, .99) backwards;
  }
  .fd-bar-col:nth-child(1) .fd-bar-fill { animation-delay: .1s; }
  .fd-bar-col:nth-child(2) .fd-bar-fill { animation-delay: .2s; }
  .fd-bar-col:nth-child(3) .fd-bar-fill { animation-delay: .3s; }
  .fd-bar-col:nth-child(4) .fd-bar-fill { animation-delay: .4s; }
  .fd-bar-col:nth-child(5) .fd-bar-fill { animation-delay: .5s; }
  .fd-bar-col:nth-child(6) .fd-bar-fill { animation-delay: .6s; }
  .fd-bar-col:nth-child(n+7) .fd-bar-fill { animation-delay: .7s; }

  /* 目标进度条从左向右生长 */
  progress {
    transform-origin: left;
    animation: fd-progress-grow 1.4s cubic-bezier(.22, .8, .26, .99) backwards;
  }
  progress:nth-of-type(1) { animation-delay: .15s; }
  progress:nth-of-type(2) { animation-delay: .3s; }
  progress:nth-of-type(n+3) { animation-delay: .45s; }

  .fd-flash { animation: fd-flash-in .5s cubic-bezier(.22, .8, .26, .99) backwards; }

  .chip, button, .button {
    transition: background-color .25s ease, color .25s ease, transform .18s ease;
  }
  .fd-main .chip:hover { transform: translateY(-1px); }
  button:active, .button:active { transform: scale(.97); }
  .fd-main tbody tr { transition: background-color .2s ease; }
  .fd-main .field.fill > input,
  .fd-main .field.fill > select,
  .fd-main .field.fill > textarea { transition: background-color .25s ease; }
}
html { scrollbar-gutter: stable; }
@supports (view-transition-name: root) {
  /* 排除切页幽灵层：它自身就是无 fd-content-enter 的 .fd-main，但离场动画必须保留 */
  .fd-main:not(.fd-content-enter):not(.fd-page-ghost),
  .fd-login-main { animation: none; }
}

main.fd-main { view-transition-name: fd-content; }
::view-transition-old(root),
::view-transition-new(root) { animation: none; }
::view-transition-old(fd-content) { animation: fd-vt-out .2s ease both; }
::view-transition-new(fd-content) { animation: fd-vt-in .3s ease both; }

@media (prefers-reduced-motion: reduce) {
  .fd-main, .fd-login-main, .fd-content-enter,
  .fd-content-enter > *, .fd-week-bar > *,
  .fd-bar-fill, progress, .fd-flash,
  .fd-page-ghost { animation: none !important; }
  .fd-side-pill { transition: none; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-old(fd-content),
  ::view-transition-new(fd-content) { animation: none; }
}

/* ---------- 响应式 ---------- */
@media (max-width: 1200px) {
  .fd-col-xl, .fd-col-lg { display: none !important; }
  .fd-dish-portion-summary { display: block; }
}
@media (min-width: 993px) and (max-width: 1199px) {
  .fd-week-grid > div { grid-area: auto / span 6 !important; }
}
@media (max-width: 992px) {
  nav.left { display: none; }
  nav.bottom {
    display: flex;
    position: fixed;
    inset: auto 0 0 0;
    z-index: 100;
    gap: 0;
    padding: .35rem .25rem calc(.35rem + env(safe-area-inset-bottom));
    background: var(--surface-container);
    border: 0;
    box-shadow: 0 -14px 34px -28px rgba(57, 46, 38, .55);
    block-size: auto;
    min-block-size: 4.25rem;
  }
  nav.bottom a:not(.button, .chip) {
    flex: 1;
    inline-size: auto !important;
    padding: 0 !important;
    gap: .1rem !important;
    font-size: .68rem !important;
  }
  nav.bottom a i { font-size: 1.35rem !important; }
  nav.bottom a.active:not(.button, .chip) { background: transparent !important; }
  nav.bottom a.active:not(.button, .chip) > i {
    background: var(--primary-container);
    color: var(--on-primary-container);
    border-radius: 1rem;
    padding: .1rem .75rem;
  }
  .fd-main { padding-block-end: 6rem; }
  .fd-mobile-bar {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding-block: .25rem 1rem;
  }
  .fd-mobile-brand {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
  }
  .fd-mobile-brand strong {
    font-family: "Noto Serif SC", "Noto Serif CJK SC", "Source Han Serif SC",
      "Song", "STZhongsong", "STKaiti", "KaiTi", "SimSun", serif;
    font-size: 1.1rem;
    font-weight: 700;
    letter-spacing: .22em;
  }
  .fd-mobile-brand span { font-size: .7rem; color: var(--on-surface-variant); }
  .fd-mobile-bar form { margin: 0; }
  .fd-mobile-name {
    max-inline-size: 6rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .fd-mobile-bar .fd-avatar {
    inline-size: 2rem;
    block-size: 2rem;
  }
  .fd-mobile-bar .fd-avatar i { font-size: 1.1rem; }
}
@media (max-width: 768px) {
  .fd-col-md { display: none !important; }
}
@media (max-width: 600px) {
  .fd-page-head { align-items: flex-start; }
  .fd-page-actions {
    inline-size: 100%;
    gap: .5rem;
  }
  .fd-page-actions .button,
  .fd-page-actions button { flex: 1; min-inline-size: 0; }
  .fd-bars { gap: .35rem; block-size: 10rem; }
  .fd-bar-track { block-size: calc(100% - 2.2rem); }
  .fd-bar-label { font-size: .58rem; }
  .fd-bar-value { font-size: .62rem; }
  .fd-bars-sm { gap: .12rem; }
  .fd-bars-sm .fd-bar-col:nth-child(even) .fd-bar-label { display: none; }
  .fd-bars-sm .fd-bar-label { font-size: .5rem; letter-spacing: -.02em; }
  .fd-usercell-date { display: none; }
  .fd-col-record { display: none !important; }
  .fd-mobile-record { display: block; }
  .fd-profile-row { flex-direction: column; }
  .fd-profile-today {
    inline-size: 100%;
    text-align: start !important;
  }
}

/* ---------- AI 助手 ---------- */
.fd-main:has(.fd-ai-thread) .fd-foot { display: none; }
.fd-main:has(.fd-ai-thread) { padding-block-end: 1rem; }

.fd-ai-thread {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  max-inline-size: 56rem;
  margin-inline: auto;
}
/* 提高优先级：防止 beer 运行时注入的 [class*=divider] + * { margin:0 } 覆盖居中 */
main.fd-main .fd-ai-thread { margin-inline: auto; }
main.fd-main .fd-ai-composer { margin-inline: auto; }

/* 欢迎态与建议问题（无卡片底，与消息列同一视觉语言） */
.fd-ai-hello {
  margin-block: 7vh 1rem;
  padding: 0 .5rem;
  text-align: center;
}
.fd-ai-hello-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 3.2rem;
  block-size: 3.2rem;
  border-radius: 1.05rem;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 22px -14px rgba(139, 80, 0, .7);
}
.fd-ai-hello-mark i { --_size: 1.6rem; }
.fd-ai-hello h5 { margin-block: 1rem .3rem; font-size: 1.35rem; letter-spacing: -.01em; }
.fd-ai-hello p { margin: 0 auto; max-inline-size: 32rem; }
.fd-ai-suggest {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .65rem;
  margin-block-start: 1.4rem;
  text-align: start;
}
.fd-ai-suggest-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .85rem .95rem;
  border: 0;
  border-radius: 1.1rem;
  background: #fffaf6;
  color: var(--on-surface);
  box-shadow: 0 0 0 1px rgba(57, 46, 38, .08), 0 10px 26px -24px rgba(57, 46, 38, .5);
  font: inherit;
  font-size: .85rem;
  font-weight: 550;
  text-align: start;
  cursor: pointer;
  transition: transform .45s cubic-bezier(.22, .8, .26, .99), box-shadow .45s ease;
}
.fd-ai-suggest-card i {
  display: inline-flex;
  font-size: 1.15rem;
  color: var(--primary);
  flex: none;
}
.fd-ai-suggest-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px rgba(139, 80, 0, .35), 0 14px 30px -22px rgba(57, 46, 38, .55);
}

/* 消息 */
.fd-ai-msg { display: flex; flex-direction: column; }
.fd-ai-msg.fd-ai-user { align-items: flex-end; }
.fd-ai-msg.fd-ai-assistant { align-items: stretch; }

.fd-ai-bubble {
  max-inline-size: min(42rem, 86%);
  padding: .7rem 1rem;
  border-end-end-radius: .45rem;
  border-radius: 1.3rem;
  background: linear-gradient(135deg, var(--primary-container), #ffefdf);
  color: var(--on-primary-container);
  box-shadow: 0 10px 24px -20px rgba(139, 80, 0, .55);
  overflow-wrap: anywhere;
}

.fd-ai-who {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin-block-end: .45rem;
  color: var(--on-surface-variant);
  font-size: .78rem;
  font-weight: 600;
}
.fd-ai-who i { font-size: 1.1rem; color: var(--primary); }
.fd-ai-who i.fd-ai-pop { animation: fd-pop .45s cubic-bezier(.34, 1.56, .64, 1); }

.fd-ai-answer {
  font-size: .95rem;
  line-height: 1.75;
  overflow-wrap: anywhere;
}
.fd-ai-answer h6 { margin-block: .6rem .2rem; }
.fd-ai-answer p { margin-block: .3rem; }
.fd-ai-answer ul, .fd-ai-answer ol { margin-block: .3rem; padding-inline-start: 1.3rem; }
.fd-ai-answer li { margin-block: .18rem; }
.fd-ai-answer code {
  padding: .08rem .4rem;
  border-radius: .45rem;
  background: var(--surface-container-high);
  font-size: .85em;
}
.fd-ai-answer .fd-ai-error { margin-block-start: .5rem; }

/* 流式光标 */
.fd-ai-caret {
  display: inline-block;
  inline-size: .55em;
  block-size: 1.05em;
  margin-inline-start: .12rem;
  border-radius: .12em;
  background: var(--primary);
  vertical-align: -0.18em;
}
.fd-ai-caret[hidden] { display: none; }

/* 思考中三点 */
.fd-ai-thinking { display: inline-flex; gap: .3rem; padding-block: .5rem; }
.fd-ai-thinking span {
  inline-size: .5rem;
  block-size: .5rem;
  border-radius: 50%;
  background: var(--primary);
}

/* 欢迎 logo 飞入回复头像的共享元素转场 */
.fd-ai-mark-ghost {
  position: fixed;
  z-index: 40;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 1.05rem;
  background: var(--primary);
  color: var(--on-primary);
  box-shadow: 0 10px 22px -14px rgba(139, 80, 0, .7);
  pointer-events: none;
  transition: transform .62s cubic-bezier(.32, .72, .22, 1.02),
              background-color .45s ease .1s,
              box-shadow .45s ease .1s;
}

/* 工具调用过程：句式展示「在【类别】获取了【内容摘要】」，括号部分带 MD3 彩底 */
.fd-ai-tools {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-block-end: .35rem;
}
.fd-ai-tool {
  --tool-bg: var(--surface-container-high);
  --tool-fg: var(--on-surface-variant);
  border-radius: .9rem;
  background: #f7f3e9;
  box-shadow: 0 0 0 1px rgba(57, 46, 38, .07), 0 8px 20px -18px rgba(57, 46, 38, .45);
  overflow: hidden;
  inline-size: 100%;
}
/* 与整体暖色调统一的低饱和主题色（陶土/橄榄/玫瑰/灰褐/沙/鼠尾草） */
.fd-tool-orange { --tool-bg: #f9e8d8; --tool-fg: #8b5000; }
.fd-tool-green { --tool-bg: #e9efdc; --tool-fg: #4c662b; }
.fd-tool-red { --tool-bg: #f7e4e1; --tool-fg: #a34040; }
.fd-tool-blue { --tool-bg: #efe6e0; --tool-fg: #755846; }
.fd-tool-purple { --tool-bg: #f3ecdd; --tool-fg: #8a6d3b; }
.fd-tool-cyan { --tool-bg: #e4ede4; --tool-fg: #4a6a52; }
.fd-ai-tool-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem;
  inline-size: 100%;
  padding: .45rem .7rem;
  border: 0;
  background: transparent;
  color: var(--on-surface-variant);
  font: inherit;
  font-size: .84rem;
  text-align: start;
  cursor: pointer;
}
.fd-ai-tool-glyph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 1.85rem;
  block-size: 1.85rem;
  border-radius: .65rem;
  background: var(--tool-bg);
  color: var(--tool-fg);
  font-size: .56rem;
  flex: none;
}
.fd-ai-tool-text {
  flex: 1 1 auto;
  min-inline-size: 0;
  min-block-size: 1.5rem;
  display: flex;
  align-items: center;
}
.fd-ai-tool-cat,
.fd-ai-tool-data { display: inline-block; }
.fd-ai-tool-cat {
  font-weight: 600;
  color: var(--on-surface);
}
.fd-ai-tool-data {
  font-weight: 550;
  color: var(--tool-fg);
}
@keyframes fd-sheen {
  from { transform: translateX(-110%); }
  to { transform: translateX(110%); }
}
@keyframes fd-text-slide {
  from { opacity: 0; clip-path: inset(-30% 100% -30% 0); transform: translateX(-14px); }
  55% { opacity: 1; }
  to { opacity: 1; clip-path: inset(-30% 0% -30% 0); transform: translateX(0); }
}
.fd-ai-tool-dots {
  display: inline-flex;
  gap: .18rem;
  flex: none;
}
.fd-ai-tool-dots i {
  inline-size: .28rem;
  block-size: .28rem;
  border-radius: 50%;
  background: var(--tool-fg);
  opacity: .45;
}
.fd-ai-tool-chev {
  margin-inline-start: auto;
  font-size: 1rem;
  color: var(--outline);
  transition: transform .3s cubic-bezier(.22, .8, .26, .99);
}
.fd-ai-tool.open .fd-ai-tool-chev { transform: rotate(180deg); }
.fd-ai-tool-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .4s cubic-bezier(.22, .8, .26, .99);
}
.fd-ai-tool.open .fd-ai-tool-body { grid-template-rows: 1fr; }
.fd-ai-tool-inner {
  min-block-size: 0;
  overflow: hidden;
  padding-inline: .55rem;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  font-size: .72rem;
  line-height: 1.6;
  color: var(--on-surface-variant);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.fd-ai-tool.open .fd-ai-tool-inner { padding-block: 0 .7rem; }

.fd-ai-error {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .85rem;
  border-radius: .9rem;
  background: var(--error-container);
  color: var(--on-error-container);
  font-size: .85rem;
}
.fd-ai-error i { font-size: 1.1rem; flex: none; }
.fd-ai-usage { margin-block-start: .35rem; }

/* 输入区：吸附底部 */
.fd-ai-composer {
  position: sticky;
  bottom: .9rem;
  z-index: 5;
  max-inline-size: 56rem;
  margin-inline: auto;
  margin-block-start: 1.2rem;
}
.fd-ai-composer-box {
  display: flex;
  align-items: flex-end;
  gap: .5rem;
  padding: .5rem .5rem .5rem 1.05rem;
  border-radius: 1.7rem;
  background: #fffaf6;
  box-shadow: 0 0 0 1px rgba(57, 46, 38, .09), 0 12px 32px -22px rgba(57, 46, 38, .55);
}
.fd-ai-composer textarea {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--on-surface);
  font: inherit;
  font-size: .95rem;
  line-height: 1.6;
  resize: none;
  outline: none;
  max-block-size: 160px;
  padding-block: .45rem;
}
.fd-ai-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.6rem;
  block-size: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  cursor: pointer;
  flex: none;
  transition: transform .25s cubic-bezier(.22, .8, .26, .99), background-color .25s ease, opacity .25s ease;
}
.fd-ai-send:hover { transform: scale(1.06); }
.fd-ai-send:active { transform: scale(.94); }
.fd-ai-send[hidden] { display: none; }
.fd-ai-send[disabled] { opacity: .4; cursor: default; }
.fd-ai-stop { background: var(--surface-container-highest); color: var(--on-surface); }
.fd-ai-note { text-align: center; margin-block-start: .45rem; }

/* 设置面板 */
.fd-ai-mask {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(34, 26, 20, .35);
  opacity: 0;
  transition: opacity .25s ease;
}
.fd-ai-mask.show { opacity: 1; }
.fd-ai-settings {
  position: fixed;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  z-index: 61;
  inline-size: min(26rem, calc(100vw - 2rem));
  padding: 1.1rem 1.2rem 1rem;
  border-radius: 1.5rem;
  background: #fffaf6;
  box-shadow: 0 24px 60px -24px rgba(34, 26, 20, .5);
  opacity: 0;
  transform: translate(-50%, -46%) scale(.96);
  transition: opacity .3s ease, transform .3s cubic-bezier(.22, .8, .26, .99);
}
.fd-ai-settings.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.fd-ai-settings .field { margin-block-end: .4rem; }
.fd-ai-settings-actions { margin-block-start: .8rem; }
.fd-ai-settings-actions .button.text { background: transparent; }

@media (max-width: 600px) {
  .fd-ai-composer { bottom: calc(5.4rem + env(safe-area-inset-bottom)); }
  .fd-main:has(.fd-ai-thread) { padding-block-end: 7rem; }
}

/* ---------- AI 动效（只在无减少动效偏好时启用） ---------- */
@media (prefers-reduced-motion: no-preference) {
  .fd-ai-msg { animation: fd-block-in .45s cubic-bezier(.22, .8, .26, .99) backwards; }
  .fd-ai-hello { animation: fd-block-in .45s cubic-bezier(.22, .8, .26, .99) backwards; }
  .fd-ai-hello-mark { animation: fd-pop .6s cubic-bezier(.34, 1.56, .64, 1) backwards; }
  .fd-ai-suggest-card { animation: fd-block-in .4s cubic-bezier(.22, .8, .26, .99) backwards; }
  .fd-ai-suggest-card:nth-child(1) { animation-delay: .05s; }
  .fd-ai-suggest-card:nth-child(2) { animation-delay: .1s; }
  .fd-ai-suggest-card:nth-child(3) { animation-delay: .15s; }
  .fd-ai-suggest-card:nth-child(4) { animation-delay: .2s; }
  .fd-ai-caret { animation: fd-caret-blink 1s steps(2, jump-none) infinite; }
  .fd-ai-thinking span { animation: fd-dot-bounce 1.2s ease-in-out infinite; }
  .fd-ai-thinking span:nth-child(2) { animation-delay: .15s; }
  .fd-ai-thinking span:nth-child(3) { animation-delay: .3s; }
  .fd-ai-tool { animation: fd-block-in .55s cubic-bezier(.22, .8, .26, .99) backwards; }
  .fd-ai-tool.done .fd-ai-tool-cat { animation: fd-text-slide .55s cubic-bezier(.25, .8, .25, 1) both; }
  .fd-ai-tool.done .fd-ai-tool-data { animation: fd-text-slide .7s cubic-bezier(.25, .8, .25, 1) .18s both; }
  /* 完成瞬间一道高光从左扫到右，强化"生成"感 */
  .fd-ai-tool.done .fd-ai-tool-head { position: relative; }
  .fd-ai-tool.done .fd-ai-tool-head::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: linear-gradient(100deg, transparent 25%, rgba(255, 255, 255, .55) 50%, transparent 75%);
    transform: translateX(-110%);
    animation: fd-sheen .9s cubic-bezier(.25, .8, .25, 1) .05s both;
  }
  .fd-ai-tool.running .fd-ai-tool-dots i { animation: fd-dot-bounce 1.2s ease-in-out infinite; }
  .fd-ai-tool.running .fd-ai-tool-dots i:nth-child(2) { animation-delay: .15s; }
  .fd-ai-tool.running .fd-ai-tool-dots i:nth-child(3) { animation-delay: .3s; }
}
@keyframes fd-caret-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}
@keyframes fd-dot-bounce {
  0%, 60%, 100% { transform: translateY(0); opacity: .5; }
  30% { transform: translateY(-.32rem); opacity: 1; }
}
@keyframes fd-spin {
  to { transform: rotate(360deg); }
}
@keyframes fd-pop {
  from { transform: scale(.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .fd-ai-caret, .fd-ai-thinking span, .fd-ai-tool-dots i,
  .fd-ai-tool-cat, .fd-ai-tool-data { animation: none !important; }
}

/* ---------- 授权管理 / 申请审核（v3.5） ---------- */
.fd-lic-summary { margin-block-end: 1rem; }
.fd-lic-summary article { padding: 1rem 1.15rem; }
.fd-lic-summary h4 { margin-block: .25rem 0; }

.fd-lic-note { margin-block-end: 1rem; }
.fd-lic-note .row { gap: .6rem; align-items: flex-start; flex-wrap: wrap; white-space: normal; }
.fd-lic-note span { flex: 1 1 16rem; min-inline-size: 0; overflow-wrap: anywhere; }
.fd-lic-note b { font-weight: 650; }

.fd-lic-card { display: flex; flex-direction: column; gap: .75rem; }
.fd-lic-card .fd-lic-stats { gap: .35rem 1rem; margin-block-start: .5rem; }
.fd-lic-card .fd-lic-form {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: .5rem .75rem;
  margin: 0;
}
.fd-lic-card .fd-lic-form .field { flex: 1 1 12rem; margin: 0; }
.fd-lic-card .fd-lic-form label.checkbox { flex: 0 0 auto; margin: 0; }
.fd-lic-card .fd-lic-form button { flex: 0 0 auto; }

.fd-nav-badge { margin-inline-start: .35rem; }
.fd-sec-title { margin-block: 1.5rem .6rem; }
.fd-review-tabs { gap: .5rem; margin-block-end: .5rem; }
.fd-lic-price { max-inline-size: 9rem; }

/* ---------- 账号分组 / 会员发放（v3.6） ---------- */
.fd-group-panel { margin-block-end: 1rem; }
.fd-group-panel .fd-group-create {
  gap: .5rem;
  align-items: flex-end;
  margin: 0;
}
.fd-group-panel .fd-group-create .field { inline-size: 14rem; margin: 0; }
.fd-group-chips { gap: .4rem; margin-block-start: .75rem; }
.fd-group-form .fd-inline-input { inline-size: 8rem; }
.fd-lic-readonly {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding-block: .4rem;
}
.fd-user-account .fd-user-badges { gap: .4rem; }
.fd-user-account .fd-vip-actions {
  gap: .75rem;
  align-items: flex-end;
  margin-block-start: .75rem;
}
.fd-vip-days { inline-size: 8.5rem; margin: 0; }
@media (max-width: 600px) {
  .fd-group-panel .fd-group-create,
  .fd-group-panel .fd-group-create .field { inline-size: 100%; }
}

/* 登录页演示账号：三个账号并排，点击填入 */
.fd-demo-list {
  display: flex;
  flex-wrap: nowrap;
  gap: .4rem;
  margin-block-start: .5rem;
}
.fd-demo-list .fd-demo-account {
  flex: 1 1 0;
  min-inline-size: 0;
  justify-content: center;
  padding-inline: .4rem;
  cursor: pointer;
  font: inherit;
  font-size: .8rem;
  appearance: none;
  white-space: nowrap;
}
.fd-demo-account:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* ---------- 分校区筛选 / 反馈删除（v3.7） ---------- */
.fd-school-filter {
  gap: .5rem;
  align-items: flex-end;
  margin: 0;
}
.fd-school-filter .field { inline-size: 14rem; margin: 0; }
.fd-review form { margin: 0; }
@media (max-width: 600px) {
  .fd-school-filter { flex-wrap: wrap; }
  .fd-school-filter .field { inline-size: 100%; }
}
.fd-main select { white-space: nowrap; text-overflow: ellipsis; }

/* 后勤只有一个校区授权：整行全宽展示 */
.fd-lic-card.fd-lic-card-full {
  grid-column: 1 / -1;
  padding: 1.5rem;
}
.fd-lic-card-full .fd-lic-stats {
  gap: .6rem 1.5rem;
  font-size: .9rem;
}
@media (min-width: 1200px) {
  .fd-staff-grid.fd-no-ai {
    grid-template-columns: minmax(0, 1fr);
  }
}
