/* ============================================================
   小榆校园 · L0 公共壳层 · base.css
   版本 v1.0 / 2026-11-18
   ------------------------------------------------------------
   唯一来源：颜色、字号、间距、圆角、阴影、壳层尺寸全部走下方 CSS 变量。
   其他设计线只允许「引用变量 + 复刻类名」，不得在页面内重写按钮/卡片/输入框。

   类名清单（可直接复制）
   · 容器    .yu-shell  .yu-main  .yu-page  .yu-page-pad
   · 标题栏  .yu-navbar  .yu-navbar__back  .yu-navbar__title  .yu-navbar__right
   · 品牌头  .yu-hero  .yu-hero__greet  .yu-hero__title  .yu-hero__sub  .yu-hero__mascot
   · 底部栏  .yu-tabbar  .yu-tabbar__inner  .yu-tabbar__item  .yu-tabbar__ic  .yu-tabbar__badge
   · 吸底条  .yu-actionbar
   · 按钮    .yu-btn + --primary --secondary --text --danger --soft --accent
             --block --sm --lg --icon  |  [disabled]  .is-loading
   · 输入    .yu-field  .yu-field__label  .yu-field__hint  .yu-field__error
             .yu-input  .yu-select  .yu-textarea  .yu-input-wrap  .yu-search
   · 选择    .yu-segmented（2–5 项等分）  .yu-chip  .yu-switch  .yu-check  .yu-radio
   · 展示    .yu-tag  .yu-badge  .yu-card  .yu-section  .yu-section__title/__more
             .yu-list  .yu-list__row  .yu-cell  .yu-grid  .yu-grid--4/--5  .yu-entry
   · 状态    .yu-empty  .yu-notice  .yu-skeleton  .yu-toast
   · 弹层    .yu-mask  .yu-dialog  .yu-sheet  （统一用 .is-open 控制）
   · 图标    .yu-ico（CSS mask 上色，配合 --ic:url(icons/xx.svg)）
   ============================================================ */

/* ==================== 1. 设计令牌 ==================== */
:root {
  color-scheme: light;

  /* 品牌绿：取自初版 3D 猫首页 */
  --yu-green-50:  #F0F8F3;
  --yu-green-100: #DEEFE4;
  --yu-green-200: #BFE3CF;
  --yu-green-300: #8FCFAC;
  --yu-green-400: #5CB68A;
  --yu-green-500: #2E8B63;   /* 基准色 */
  --yu-green-600: #267A57;
  --yu-green-700: #1F6B4A;   /* 深按钮 / 选中态 */
  --yu-green-800: #175239;   /* 头部渐变终点 */
  --yu-green-900: #0F3827;

  /* 暖中性：米白纸感 */
  --yu-cream:       #FFF8F0;  /* 页面底色 */
  --yu-cream-deep:  #FBF0E3;  /* 分区底 / 按压态 */
  --yu-white:       #FFFFFF;  /* 卡片 */
  --yu-paper:       #FFFDF9;  /* 输入框 / 浮层 */
  --yu-ink:         #333333;  /* 正文 */
  --yu-ink-2:       #6F6960;  /* 次要文字 */
  --yu-ink-3:       #A29A90;  /* 辅助 / 占位 */
  --yu-line:        #EFE4D6;  /* 分隔线 / 卡片描边 */
  --yu-line-strong: #E3D5C4;  /* 输入框描边 */

  /* 猫小榆 IP 点缀（橘色虎斑 / 奶白肚皮 / 草绿围脖） */
  --yu-orange:      #FF9D3C;
  --yu-orange-600:  #EE8828;
  --yu-orange-700:  #D96B1F;
  --yu-orange-soft: #FFF0DC;
  --yu-peach:       #FFD7B0;
  --yu-leaf:        #7FB069;
  --yu-leaf-soft:   #EDF5E6;

  /* 语义色 */
  --yu-success:      #3FA96B;
  --yu-success-soft: #E8F6EE;
  --yu-warning:      #E8892F;
  --yu-warning-soft: #FFF1E2;
  --yu-danger:       #D9534F;
  --yu-danger-soft:  #FDECEC;
  --yu-info:         #2E8B63;
  --yu-info-soft:    #EAF5EE;

  /* 语义别名（页面优先用这一层） */
  --yu-bg:             var(--yu-cream);
  --yu-bg-sub:         var(--yu-cream-deep);
  --yu-surface:        var(--yu-white);
  --yu-surface-alt:    var(--yu-paper);
  --yu-text:           var(--yu-ink);
  --yu-text-2:         var(--yu-ink-2);
  --yu-text-3:         var(--yu-ink-3);
  --yu-border:         var(--yu-line);
  --yu-border-strong:  var(--yu-line-strong);
  --yu-primary:        var(--yu-green-500);
  --yu-primary-strong: var(--yu-green-700);
  --yu-primary-deep:   var(--yu-green-800);
  --yu-primary-soft:   var(--yu-green-50);
  --yu-on-primary:     #FFFFFF;
  --yu-accent:         var(--yu-orange);
  --yu-accent-strong:  var(--yu-orange-700);
  --yu-accent-soft:    var(--yu-orange-soft);
  --yu-focus-ring:     rgba(46, 139, 99, .16);
  --yu-danger-ring:    rgba(217, 83, 79, .16);

  /* 渐变 */
  --yu-gradient-hero:    linear-gradient(145deg, #49A57D 0%, #2E8B63 52%, #1F6B4A 100%);
  --yu-gradient-primary: linear-gradient(180deg, #33996E 0%, #2E8B63 100%);
  --yu-gradient-accent:  linear-gradient(180deg, #FFAD4D 0%, #FF9D3C 100%);
  --yu-gradient-warm:    linear-gradient(135deg, #FFF3E6 0%, #FFE4D1 100%);
  --yu-gradient-leaf:    linear-gradient(135deg, #F0F8F1 0%, #DCEFE3 100%);

  /* 字体 */
  --yu-font-sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --yu-font-display: "PingFang SC", "HarmonyOS Sans SC", "YouYuan", "幼圆", "Microsoft YaHei", sans-serif;
  --yu-font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* 字阶 */
  --yu-fs-display: 28px; --yu-lh-display: 36px;
  --yu-fs-h1:      24px; --yu-lh-h1:      32px;
  --yu-fs-h2:      20px; --yu-lh-h2:      28px;
  --yu-fs-h3:      17px; --yu-lh-h3:      24px;
  --yu-fs-body:    15px; --yu-lh-body:    23px;
  --yu-fs-sm:      14px; --yu-lh-sm:      22px;
  --yu-fs-caption: 12px; --yu-lh-caption: 18px;
  --yu-fs-micro:   11px; --yu-lh-micro:   16px;
  --yu-fs-number:  30px; --yu-lh-number:  34px;

  /* 间距（4px 基准） */
  --yu-space-1:  4px;
  --yu-space-2:  8px;
  --yu-space-3:  12px;
  --yu-space-4:  16px;
  --yu-space-5:  20px;
  --yu-space-6:  24px;
  --yu-space-7:  32px;
  --yu-space-8:  40px;

  /* 布局 */
  --yu-gutter:       16px;   /* 页面左右留白 */
  --yu-card-gap:     12px;
  --yu-section-gap:  20px;
  --yu-shell:        480px;  /* 手机/桌面统一内容宽度 */
  --yu-tap-min:      44px;
  --yu-tabbar-h:     64px;
  --yu-navbar-h:     52px;
  --yu-safe-bottom:  env(safe-area-inset-bottom, 0px);
  --yu-safe-top:     env(safe-area-inset-top, 0px);

  /* 圆角 */
  --yu-radius-xs:   6px;
  --yu-radius-sm:   8px;
  --yu-radius-md:   12px;
  --yu-radius-lg:   16px;
  --yu-radius-xl:   22px;
  --yu-radius-pill: 999px;

  /* 阴影：暖色投影，避免冷灰 */
  --yu-shadow-xs: 0 1px 2px rgba(86, 62, 34, .04);
  --yu-shadow-sm: 0 2px 6px rgba(86, 62, 34, .05), 0 1px 2px rgba(86, 62, 34, .03);
  --yu-shadow-md: 0 6px 18px rgba(86, 62, 34, .07), 0 2px 6px rgba(86, 62, 34, .04);
  --yu-shadow-lg: 0 16px 40px rgba(86, 62, 34, .10), 0 4px 12px rgba(86, 62, 34, .05);
  --yu-shadow-green:  0 8px 20px rgba(31, 107, 74, .18);
  --yu-shadow-orange: 0 8px 20px rgba(217, 107, 31, .20);

  /* 动效 */
  --yu-ease: cubic-bezier(.22, .8, .3, 1);
  --yu-ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --yu-dur-fast: 120ms;
  --yu-dur: 180ms;
  --yu-dur-slow: 260ms;

  /* 层级 */
  --yu-z-nav: 30;
  --yu-z-tabbar: 40;
  --yu-z-mask: 100;
  --yu-z-modal: 110;
  --yu-z-toast: 999;
}

/* ==================== 2. 基础重置 ==================== */
*, *::before, *::after { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; }
body {
  background: #F1E8DC;               /* 桌面端两侧留白 */
  color: var(--yu-text);
  font-family: var(--yu-font-sans);
  font-size: var(--yu-fs-body);
  line-height: var(--yu-lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, p, figure { margin: 0; }
a { color: inherit; text-decoration: none; }
img { -webkit-user-drag: none; user-select: none; max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { border: 0; background: none; padding: 0; cursor: pointer; }
button:disabled { cursor: not-allowed; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--yu-focus-ring); outline-offset: 2px; }
::selection { background: var(--yu-green-200); color: var(--yu-green-900); }

/* ==================== 3. 文字 ==================== */
.yu-display { font-family: var(--yu-font-display); font-size: var(--yu-fs-display); line-height: var(--yu-lh-display); font-weight: 800; letter-spacing: .01em; }
.yu-h1 { font-size: var(--yu-fs-h1); line-height: var(--yu-lh-h1); font-weight: 700; }
.yu-h2 { font-size: var(--yu-fs-h2); line-height: var(--yu-lh-h2); font-weight: 700; }
.yu-h3 { font-size: var(--yu-fs-h3); line-height: var(--yu-lh-h3); font-weight: 600; }
.yu-body { font-size: var(--yu-fs-body); line-height: var(--yu-lh-body); }
.yu-sm { font-size: var(--yu-fs-sm); line-height: var(--yu-lh-sm); }
.yu-caption { font-size: var(--yu-fs-caption); line-height: var(--yu-lh-caption); color: var(--yu-text-2); }
.yu-micro { font-size: var(--yu-fs-micro); line-height: var(--yu-lh-micro); color: var(--yu-text-3); }
.yu-number { font-size: var(--yu-fs-number); line-height: var(--yu-lh-number); font-weight: 700; font-variant-numeric: tabular-nums; }
.yu-text-2 { color: var(--yu-text-2); }
.yu-text-3 { color: var(--yu-text-3); }
.yu-text-primary { color: var(--yu-primary-strong); }
.yu-text-accent { color: var(--yu-accent-strong); }
.yu-text-danger { color: var(--yu-danger); }
.yu-bold { font-weight: 700; }
.yu-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yu-clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.yu-tabular { font-variant-numeric: tabular-nums; }

/* ==================== 4. 图标 ==================== */
/* 用法：<span class="yu-ico" style="--ic:url(icons/home.svg)"></span>
   颜色跟随 color，尺寸跟随 font-size 或 .yu-ico--lg 等修饰 */
.yu-ico {
  display: inline-block; flex-shrink: 0;
  width: 24px; height: 24px;
  background-color: currentColor;
  -webkit-mask-image: var(--ic); mask-image: var(--ic);
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center;
  -webkit-mask-size: contain; mask-size: contain;
  vertical-align: -0.18em;
}
.yu-ico--xs { width: 16px; height: 16px; }
.yu-ico--sm { width: 20px; height: 20px; }
.yu-ico--lg { width: 28px; height: 28px; }
.yu-ico--xl { width: 32px; height: 32px; }

/* ==================== 5. 壳层：容器 ==================== */
.yu-shell {
  display: flex; flex-direction: column;
  position: relative;
  width: 100%; max-width: var(--yu-shell);
  min-height: 100vh; min-height: 100dvh;
  margin: 0 auto;
  background: var(--yu-bg);
  overflow-x: clip;
}
@media (min-width: 520px) {
  .yu-shell { box-shadow: 0 0 60px rgba(86, 62, 34, .08); }
}
.yu-main { flex: 1; min-width: 0; }
/* 内容区：自动给底部 tab 让位，页面不需要手写 padding-bottom */
.yu-page { padding: 0 var(--yu-gutter) calc(var(--yu-tabbar-h) + 20px + var(--yu-safe-bottom)); }
.yu-page--nopad { padding-bottom: calc(var(--yu-safe-bottom) + 20px); }
.yu-page-pad { height: calc(var(--yu-tabbar-h) + 20px + var(--yu-safe-bottom)); }
.yu-stack > * + * { margin-top: var(--yu-card-gap); }
.yu-stack--lg > * + * { margin-top: var(--yu-section-gap); }

/* ==================== 6. 壳层：顶部标题栏 ==================== */
.yu-navbar {
  position: sticky; top: 0; z-index: var(--yu-z-nav);
  display: flex; align-items: center; gap: 4px;
  min-height: var(--yu-navbar-h);
  padding: calc(6px + var(--yu-safe-top)) 10px 6px;
  background: rgba(255, 248, 240, .92);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--yu-border);
}
.yu-navbar__back {
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%;
  color: var(--yu-text);
  transition: background var(--yu-dur-fast) var(--yu-ease);
}
.yu-navbar__back:active { background: var(--yu-cream-deep); }
/* 标题绝对居中：右侧操作位数量变化也不会把标题挤偏 */
.yu-navbar__title {
  position: absolute; left: 50%; transform: translateX(-50%);
  max-width: 62%; min-width: 0;
  text-align: center;
  font-size: var(--yu-fs-h3); font-weight: 700;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.yu-navbar__right { display: flex; align-items: center; gap: 2px; margin-left: auto; flex-shrink: 0; }
.yu-navbar__action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 50%; color: var(--yu-text);
}
.yu-navbar__action:active { background: var(--yu-cream-deep); }
/* 透明标题栏（浮在 hero 上时用） */
.yu-navbar--clear {
  background: transparent; border-bottom-color: transparent;
  -webkit-backdrop-filter: none; backdrop-filter: none; color: #fff;
}
.yu-navbar--clear .yu-navbar__back,
.yu-navbar--clear .yu-navbar__action { color: #fff; }
.yu-navbar--clear .yu-navbar__back:active,
.yu-navbar--clear .yu-navbar__action:active { background: rgba(255, 255, 255, .16); }

/* ==================== 7. 壳层：品牌头（首页 IP 区） ==================== */
.yu-hero {
  position: relative; overflow: hidden;
  padding: 18px var(--yu-gutter) 22px;
  border-radius: 0 0 var(--yu-radius-xl) var(--yu-radius-xl);
  background: var(--yu-gradient-hero);
  color: #fff;
  box-shadow: 0 12px 28px rgba(31, 107, 74, .16);
}
.yu-hero::before {
  content: ""; position: absolute; width: 190px; height: 190px; right: -92px; bottom: -118px;
  border: 26px solid rgba(255, 255, 255, .06); border-radius: 50%; pointer-events: none;
}
.yu-hero::after {
  content: ""; position: absolute; left: 20px; bottom: 16px; width: 62px; height: 26px;
  background: radial-gradient(circle, rgba(255, 255, 255, .14) 2px, transparent 2.5px);
  background-size: 13px 13px; transform: rotate(-12deg); pointer-events: none;
}
.yu-hero__inner { position: relative; z-index: 2; }
/* 带 IP 立绘的首页头：立绘压在底部，右上角留出通知位 */
.yu-hero--ip { min-height: 176px; }
.yu-hero--ip .yu-hero__inner { min-height: 112px; }
.yu-hero--ip .yu-hero__top { position: relative; z-index: 3; }
.yu-hero--ip .yu-hero__mascot { width: 108px; }
.yu-hero__greet { font-size: var(--yu-fs-caption); opacity: .86; }
.yu-hero__title {
  margin-top: 2px; font-family: var(--yu-font-display);
  font-size: 27px; line-height: 1.2; font-weight: 800; letter-spacing: .02em;
  text-shadow: 0 2px 6px rgba(23, 82, 57, .22);
}
.yu-hero__sub { margin-top: 6px; font-size: var(--yu-fs-caption); opacity: .9; }
.yu-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.yu-hero__iconbtn {
  position: relative; flex-shrink: 0;
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255, 255, 255, .16);
  border: 1px solid rgba(255, 255, 255, .22);
  color: #fff;
}
.yu-hero__iconbtn:active { background: rgba(255, 255, 255, .26); }
.yu-hero__mascot {
  position: absolute; right: 6px; bottom: 0; z-index: 1;
  width: 118px; height: auto;
  filter: drop-shadow(0 8px 10px rgba(23, 82, 57, .22));
  animation: yu-breathe 3.6s ease-in-out infinite;
  transform-origin: 50% 92%;
}
@keyframes yu-breathe { 0%, 100% { transform: scale(1); } 8% { transform: scale(1.05); } 20% { transform: scale(1); } }

/* ==================== 8. 壳层：底部 tab 栏 ==================== */
.yu-tabbar {
  position: fixed; z-index: var(--yu-z-tabbar);
  left: 0; right: 0; bottom: 0;
  padding-bottom: var(--yu-safe-bottom);
  background: rgba(255, 255, 255, .94);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--yu-border);
}
/* 5 项固定，用 grid-auto-columns 兼容以后增减（不推荐） */
.yu-tabbar__inner {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  width: 100%; max-width: var(--yu-shell);
  height: var(--yu-tabbar-h);
  margin: 0 auto;
}
.yu-tabbar__item {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--yu-ink-3); font-size: var(--yu-fs-micro); line-height: 1;
  transition: color var(--yu-dur-fast) var(--yu-ease);
}
.yu-tabbar__item:active { transform: scale(.94); }
.yu-tabbar__ic {
  position: relative;
  display: grid; place-items: center;
  width: 42px; height: 26px; border-radius: var(--yu-radius-sm);
  transition: background var(--yu-dur-fast) var(--yu-ease);
}
.yu-tabbar__ic .yu-ico { width: 23px; height: 23px; }
.yu-tabbar__item.is-active { color: var(--yu-primary-strong); font-weight: 600; }
.yu-tabbar__item.is-active .yu-tabbar__ic { background: var(--yu-primary-soft); }
.yu-tabbar__badge {
  position: absolute; top: -6px; right: -5px;
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: var(--yu-radius-pill);
  background: var(--yu-danger); color: #fff;
  font-size: 10px; line-height: 16px; font-weight: 700; text-align: center;
  box-shadow: 0 0 0 2px var(--yu-surface);
}
.yu-tabbar__badge--dot { min-width: 8px; width: 8px; height: 8px; padding: 0; }
/* 桌面端：底部栏收进 480 列，做成圆角浮岛，不横贯全屏 */
@media (min-width: 560px) {
  .yu-tabbar {
    left: 50%; right: auto; width: var(--yu-shell);
    transform: translateX(-50%);
    border: 1px solid var(--yu-border); border-bottom: 0;
    border-radius: var(--yu-radius-xl) var(--yu-radius-xl) 0 0;
    box-shadow: 0 -10px 34px rgba(86, 62, 34, .10);
  }
}

/* ==================== 9. 壳层：吸底操作条 ==================== */
.yu-actionbar {
  position: fixed; z-index: var(--yu-z-tabbar);
  left: 0; right: 0; bottom: 0;
  padding: 10px var(--yu-gutter) calc(10px + var(--yu-safe-bottom));
  background: rgba(255, 255, 255, .96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--yu-border);
  display: flex; align-items: center; gap: 10px;
}
.yu-actionbar__inner { display: flex; align-items: center; gap: 10px; width: 100%; max-width: var(--yu-shell); margin: 0 auto; }
.yu-actionbar__info { flex: 1; min-width: 0; }
@media (min-width: 560px) {
  .yu-actionbar { left: 50%; right: auto; width: var(--yu-shell); transform: translateX(-50%); border-radius: var(--yu-radius-xl) var(--yu-radius-xl) 0 0; box-shadow: 0 -10px 34px rgba(86, 62, 34, .10); }
}

/* ==================== 10. 按钮 ==================== */
.yu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 44px; padding: 0 20px;
  border-radius: var(--yu-radius-pill);
  font-size: var(--yu-fs-body); font-weight: 600; line-height: 1;
  white-space: nowrap;
  transition: transform var(--yu-dur-fast) var(--yu-ease),
              background var(--yu-dur-fast) var(--yu-ease),
              box-shadow var(--yu-dur) var(--yu-ease);
}
.yu-btn:active { transform: scale(.97); }
.yu-btn--block { display: flex; width: 100%; }
.yu-btn--sm { height: 34px; padding: 0 14px; font-size: var(--yu-fs-caption); gap: 4px; }
.yu-btn--lg { height: 50px; padding: 0 26px; font-size: 16px; }
.yu-btn--icon { width: 44px; padding: 0; }
.yu-btn--sm.yu-btn--icon { width: 34px; }

.yu-btn--primary {
  background: var(--yu-gradient-primary); color: var(--yu-on-primary);
  box-shadow: var(--yu-shadow-green);
}
.yu-btn--primary:active { background: var(--yu-green-700); box-shadow: 0 2px 6px rgba(31, 107, 74, .18); }
.yu-btn--secondary {
  background: var(--yu-white); color: var(--yu-primary-strong);
  border: 1.5px solid var(--yu-green-200);
}
.yu-btn--secondary:active { background: var(--yu-green-50); }
.yu-btn--text { background: transparent; color: var(--yu-primary-strong); padding: 0 10px; }
.yu-btn--text:active { background: var(--yu-green-50); }
.yu-btn--danger { background: var(--yu-danger); color: #fff; box-shadow: 0 8px 18px rgba(217, 83, 79, .18); }
.yu-btn--danger:active { background: #B8403C; box-shadow: 0 2px 6px rgba(217, 83, 79, .18); }
.yu-btn--soft { background: var(--yu-primary-soft); color: var(--yu-primary-strong); }
.yu-btn--soft:active { background: var(--yu-green-200); }
.yu-btn--accent { background: var(--yu-gradient-accent); color: #5C2E05; box-shadow: var(--yu-shadow-orange); }
.yu-btn--accent:active { background: var(--yu-orange-600); }

/* 禁用 */
.yu-btn[disabled], .yu-btn.is-disabled {
  background: var(--yu-cream-deep); color: var(--yu-ink-3); border-color: transparent;
  box-shadow: none; pointer-events: none;
}
.yu-btn--text[disabled], .yu-btn--text.is-disabled { background: transparent; color: var(--yu-ink-3); }
/* 加载：文案保留占位，中间转圈 */
.yu-btn.is-loading { position: relative; color: transparent !important; pointer-events: none; }
.yu-btn.is-loading::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 17px; height: 17px; margin: -9px 0 0 -9px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff;
  border-radius: 50%;
  animation: yu-spin .7s linear infinite;
}
.yu-btn--secondary.is-loading::after,
.yu-btn--text.is-loading::after,
.yu-btn--soft.is-loading::after,
.yu-btn--accent.is-loading::after {
  border-color: rgba(46, 139, 99, .22); border-top-color: var(--yu-green-700);
}
.yu-btn--accent.is-loading::after { border-color: rgba(92, 46, 5, .2); border-top-color: #5C2E05; }
@keyframes yu-spin { to { transform: rotate(360deg); } }

/* ==================== 11. 表单 ==================== */
.yu-field { margin-bottom: var(--yu-space-3); }
.yu-field__label { display: block; margin-bottom: 6px; font-size: var(--yu-fs-caption); color: var(--yu-text-2); }
.yu-field__label em { color: var(--yu-danger); font-style: normal; margin-left: 2px; }
.yu-field__hint { margin-top: 5px; font-size: var(--yu-fs-micro); color: var(--yu-text-3); }
.yu-field__error { margin-top: 5px; font-size: var(--yu-fs-micro); color: var(--yu-danger); }

.yu-input, .yu-select, .yu-textarea {
  width: 100%;
  border: 1px solid var(--yu-border-strong);
  border-radius: var(--yu-radius-md);
  background: var(--yu-surface-alt);
  color: var(--yu-text);
  font-size: var(--yu-fs-sm);
  outline: none;
  transition: border-color var(--yu-dur-fast) var(--yu-ease), box-shadow var(--yu-dur-fast) var(--yu-ease);
}
.yu-input, .yu-select { height: 46px; padding: 0 14px; }
.yu-textarea { min-height: 96px; padding: 12px 14px; line-height: 1.6; resize: vertical; }
.yu-input::placeholder, .yu-textarea::placeholder { color: var(--yu-ink-3); }
.yu-input:hover, .yu-select:hover, .yu-textarea:hover { border-color: var(--yu-green-300); }
.yu-input:focus, .yu-select:focus, .yu-textarea:focus {
  border-color: var(--yu-green-400);
  box-shadow: 0 0 0 3px var(--yu-focus-ring);
  background: var(--yu-white);
}
.yu-input[disabled], .yu-select[disabled], .yu-textarea[disabled] {
  background: var(--yu-cream-deep); color: var(--yu-ink-3); cursor: not-allowed;
}
.yu-input.is-error, .yu-textarea.is-error {
  border-color: var(--yu-danger); box-shadow: 0 0 0 3px var(--yu-danger-ring);
}
.yu-select {
  appearance: none; -webkit-appearance: none;
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23A29A90' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
}
.yu-input-wrap { position: relative; display: flex; align-items: center; }
.yu-input-wrap .yu-ico { position: absolute; left: 13px; color: var(--yu-ink-3); pointer-events: none; }
.yu-input-wrap .yu-input { padding-left: 42px; }
.yu-input-wrap__suffix { position: absolute; right: 12px; color: var(--yu-ink-3); }

/* 搜索框 */
.yu-search {
  display: flex; align-items: center; gap: 8px;
  height: 44px; padding: 0 14px;
  border-radius: var(--yu-radius-pill);
  background: var(--yu-surface-alt);
  border: 1px solid var(--yu-border-strong);
  color: var(--yu-text-3); font-size: var(--yu-fs-sm);
  transition: border-color var(--yu-dur-fast) var(--yu-ease), box-shadow var(--yu-dur-fast) var(--yu-ease);
}
.yu-search:focus-within { border-color: var(--yu-green-300); box-shadow: 0 0 0 3px var(--yu-focus-ring); }
.yu-search input { flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none; color: var(--yu-text); }
.yu-search input::placeholder { color: var(--yu-ink-3); }
.yu-search__action {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--yu-primary); color: #fff; flex-shrink: 0;
}

/* ==================== 12. 分段 / 筛选 / 开关 ==================== */
.yu-segmented {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  padding: 4px;
  background: var(--yu-cream-deep);
  border-radius: var(--yu-radius-pill);
}
.yu-segmented button {
  height: 36px; border-radius: var(--yu-radius-pill);
  font-size: var(--yu-fs-sm); font-weight: 600; color: var(--yu-text-2);
  transition: background var(--yu-dur-fast) var(--yu-ease), color var(--yu-dur-fast) var(--yu-ease);
}
.yu-segmented button.is-active {
  background: var(--yu-white); color: var(--yu-primary-strong);
  box-shadow: var(--yu-shadow-sm);
}
.yu-chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 4px; scrollbar-width: none; }
.yu-chips::-webkit-scrollbar { display: none; }
.yu-chip {
  flex-shrink: 0;
  display: inline-flex; align-items: center; gap: 4px;
  height: 32px; padding: 0 14px;
  border-radius: var(--yu-radius-pill);
  background: var(--yu-surface); border: 1px solid var(--yu-border);
  color: var(--yu-text-2); font-size: var(--yu-fs-caption); font-weight: 500;
  transition: all var(--yu-dur-fast) var(--yu-ease);
}
.yu-chip.is-active {
  background: var(--yu-primary); border-color: var(--yu-primary);
  color: #fff; font-weight: 600;
}
.yu-chip--accent.is-active { background: var(--yu-accent); border-color: var(--yu-accent); color: #5C2E05; }

.yu-switch { position: relative; display: inline-flex; align-items: center; flex-shrink: 0; }
.yu-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.yu-switch__track {
  width: 46px; height: 27px; border-radius: var(--yu-radius-pill);
  background: #DCD3C7; transition: background var(--yu-dur) var(--yu-ease);
}
.yu-switch__track::after {
  content: ""; display: block; width: 23px; height: 23px; margin: 2px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
  transition: transform var(--yu-dur) var(--yu-ease-spring);
}
.yu-switch input:checked + .yu-switch__track { background: var(--yu-primary); }
.yu-switch input:checked + .yu-switch__track::after { transform: translateX(19px); }
.yu-switch input:focus-visible + .yu-switch__track { box-shadow: 0 0 0 3px var(--yu-focus-ring); }
.yu-switch input:disabled + .yu-switch__track { opacity: .45; }

.yu-check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--yu-fs-sm); }
.yu-check input { position: absolute; opacity: 0; width: 0; height: 0; }
.yu-check__box {
  position: relative; width: 20px; height: 20px; flex-shrink: 0;
  border: 1.6px solid var(--yu-border-strong); border-radius: 6px; background: #fff;
  transition: all var(--yu-dur-fast) var(--yu-ease);
}
.yu-check__box::after {
  content: ""; position: absolute; left: 6px; top: 2px;
  width: 5px; height: 10px;
  border: 2px solid #fff; border-top: 0; border-left: 0;
  transform: rotate(45deg) scale(0); transform-origin: center;
  transition: transform var(--yu-dur-fast) var(--yu-ease-spring);
}
.yu-check input:checked + .yu-check__box { background: var(--yu-primary); border-color: var(--yu-primary); }
.yu-check input:checked + .yu-check__box::after { transform: rotate(45deg) scale(1); }

.yu-radio { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: var(--yu-fs-sm); }
.yu-radio input { position: absolute; opacity: 0; width: 0; height: 0; }
.yu-radio__dot {
  position: relative; width: 20px; height: 20px; flex-shrink: 0;
  border: 1.6px solid var(--yu-border-strong); border-radius: 50%; background: #fff;
}
.yu-radio__dot::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  background: var(--yu-primary); transform: scale(0);
  transition: transform var(--yu-dur-fast) var(--yu-ease-spring);
}
.yu-radio input:checked + .yu-radio__dot { border-color: var(--yu-primary); }
.yu-radio input:checked + .yu-radio__dot::after { transform: scale(1); }

/* ==================== 13. 标签 / 徽章 ==================== */
.yu-tag {
  display: inline-flex; align-items: center; gap: 3px;
  height: 22px; padding: 0 8px;
  border-radius: var(--yu-radius-xs);
  background: var(--yu-primary-soft); color: var(--yu-primary-strong);
  font-size: var(--yu-fs-micro); font-weight: 600; line-height: 1;
  white-space: nowrap; flex-shrink: 0;
}
.yu-tag--accent { background: var(--yu-orange-soft); color: var(--yu-orange-700); }
.yu-tag--warning { background: var(--yu-warning-soft); color: #9A5A17; }
.yu-tag--danger { background: var(--yu-danger-soft); color: var(--yu-danger); }
.yu-tag--neutral { background: #F4EFE8; color: var(--yu-text-3); }
.yu-tag--outline { background: transparent; border: 1px solid var(--yu-green-200); }
.yu-tag--lg { height: 26px; padding: 0 10px; font-size: var(--yu-fs-caption); }

.yu-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: var(--yu-radius-pill);
  background: var(--yu-danger); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.yu-badge--dot { min-width: 8px; width: 8px; height: 8px; padding: 0; }
.yu-badge--green { background: var(--yu-primary); }
.yu-badge--orange { background: var(--yu-accent); color: #5C2E05; }
.yu-badge--neutral { background: #EFE8DF; color: var(--yu-text-2); }
.yu-badge--float { position: absolute; top: -5px; right: -7px; box-shadow: 0 0 0 2px var(--yu-surface); }

/* ==================== 14. 卡片 / 区块 / 列表 ==================== */
.yu-card {
  display: block;   /* 允许 <a class="yu-card"> 直接使用 */
  background: var(--yu-surface);
  border: 1px solid var(--yu-border);
  border-radius: var(--yu-radius-lg);
  box-shadow: var(--yu-shadow-sm);
  padding: var(--yu-space-4);
}
.yu-card--flat { box-shadow: none; }
.yu-card--warm { background: var(--yu-gradient-warm); border-color: #F6E3CE; }
.yu-card--leaf { background: var(--yu-gradient-leaf); border-color: #DDEEE4; }
.yu-card--press { transition: transform var(--yu-dur-fast) var(--yu-ease), box-shadow var(--yu-dur) var(--yu-ease); }
.yu-card--press:active { transform: scale(.985); box-shadow: var(--yu-shadow-xs); }

.yu-section { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 10px; }
.yu-section__title { display: flex; align-items: center; gap: 6px; font-size: var(--yu-fs-h3); font-weight: 700; }
.yu-section__sub { font-size: var(--yu-fs-micro); color: var(--yu-text-3); font-weight: 400; }
.yu-section__more { display: inline-flex; align-items: center; gap: 2px; font-size: var(--yu-fs-caption); color: var(--yu-text-3); }

.yu-list { background: var(--yu-surface); border: 1px solid var(--yu-border); border-radius: var(--yu-radius-lg); overflow: hidden; box-shadow: var(--yu-shadow-sm); }
.yu-list__row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; min-height: 56px;
  transition: background var(--yu-dur-fast) var(--yu-ease);
}
.yu-list__row + .yu-list__row { border-top: 1px solid var(--yu-border); }
.yu-list__row:active { background: var(--yu-bg-sub); }
.yu-list__thumb {
  width: 54px; height: 54px; flex-shrink: 0;
  border-radius: var(--yu-radius-md); object-fit: cover;
  background: var(--yu-primary-soft);
}
.yu-list__body { flex: 1; min-width: 0; }
.yu-list__title { display: flex; align-items: center; gap: 6px; font-size: var(--yu-fs-sm); font-weight: 600; }
.yu-list__desc { margin-top: 3px; font-size: var(--yu-fs-caption); color: var(--yu-text-2); }
.yu-list__meta { margin-top: 4px; font-size: var(--yu-fs-micro); color: var(--yu-text-3); }
.yu-list__side { flex-shrink: 0; text-align: right; }

.yu-cell {
  display: flex; align-items: center; gap: 10px;
  min-height: 52px; padding: 12px 14px;
  font-size: var(--yu-fs-sm);
}
.yu-cell + .yu-cell { border-top: 1px solid var(--yu-border); }
.yu-cell__label { flex: 1; min-width: 0; }
.yu-cell__value { font-size: var(--yu-fs-caption); color: var(--yu-text-3); }
.yu-cell__arrow { color: var(--yu-ink-3); }

/* 宫格入口 */
.yu-grid { display: grid; gap: var(--yu-space-2); }
.yu-grid--4 { grid-template-columns: repeat(4, 1fr); }
.yu-grid--5 { grid-template-columns: repeat(5, 1fr); }
.yu-grid--2 { grid-template-columns: repeat(2, 1fr); }
.yu-entry { display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 0; text-align: center; }
.yu-entry__ic {
  display: grid; place-items: center;
  width: 50px; height: 50px; border-radius: var(--yu-radius-md);
  background: var(--yu-primary-soft); color: var(--yu-primary-strong);
  transition: transform var(--yu-dur-fast) var(--yu-ease), background var(--yu-dur-fast) var(--yu-ease);
}
.yu-entry__ic .yu-ico { width: 25px; height: 25px; }
.yu-entry:active .yu-entry__ic { transform: scale(.92); background: var(--yu-green-100); }
.yu-entry__ic--orange { background: var(--yu-orange-soft); color: var(--yu-orange-700); }
.yu-entry__ic--leaf { background: var(--yu-leaf-soft); color: #5E8F4C; }
.yu-entry__ic--warm { background: #FFF6EA; color: #B27A3E; }
.yu-entry__tx { max-width: 100%; font-size: var(--yu-fs-micro); color: var(--yu-text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ==================== 15. 状态：空 / 提示 / 骨架 ==================== */
.yu-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 48px 24px; text-align: center;
}
.yu-empty__art { width: 88px; height: 88px; margin-bottom: 12px; color: var(--yu-green-300); }
.yu-empty__title { font-size: var(--yu-fs-sm); font-weight: 600; color: var(--yu-text-2); }
.yu-empty__desc { margin-top: 5px; font-size: var(--yu-fs-caption); color: var(--yu-text-3); line-height: 1.6; }
.yu-empty__action { margin-top: 14px; }

.yu-notice {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px;
  border-radius: var(--yu-radius-md);
  background: var(--yu-info-soft); color: var(--yu-primary-strong);
  font-size: var(--yu-fs-caption); line-height: 1.6;
}
.yu-notice .yu-ico { margin-top: 1px; color: var(--yu-primary); }
.yu-notice--warning { background: var(--yu-warning-soft); color: #9A5A17; }
.yu-notice--warning .yu-ico { color: var(--yu-warning); }
.yu-notice--danger { background: var(--yu-danger-soft); color: #A43B37; }
.yu-notice--danger .yu-ico { color: var(--yu-danger); }
.yu-notice--neutral { background: var(--yu-bg-sub); color: var(--yu-text-2); }
.yu-notice--neutral .yu-ico { color: var(--yu-ink-3); }

.yu-skeleton {
  border-radius: var(--yu-radius-sm);
  background: linear-gradient(90deg, #F3EAE0 25%, #FBF4EC 37%, #F3EAE0 63%);
  background-size: 400% 100%;
  animation: yu-shine 1.3s ease infinite;
}
@keyframes yu-shine { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

.yu-divider { height: 1px; background: var(--yu-border); }
.yu-space-8 { height: 8px; }
.yu-space-12 { height: 12px; }
.yu-space-16 { height: 16px; }

/* ==================== 16. 弹层：遮罩 / 对话框 / 底部面板 / 轻提示 ==================== */
.yu-mask {
  position: fixed; inset: 0; z-index: var(--yu-z-mask);
  background: rgba(35, 30, 24, .44);
  opacity: 0; visibility: hidden;
  transition: opacity var(--yu-dur) var(--yu-ease), visibility var(--yu-dur);
}
.yu-mask.is-open { opacity: 1; visibility: visible; }

.yu-dialog {
  position: fixed; z-index: var(--yu-z-modal);
  left: 50%; top: 50%;
  width: min(320px, calc(100vw - 56px));
  padding: 22px 20px 18px;
  border-radius: var(--yu-radius-xl);
  background: var(--yu-surface);
  box-shadow: var(--yu-shadow-lg);
  opacity: 0; visibility: hidden;
  transform: translate(-50%, -50%) scale(.94);
  transition: opacity var(--yu-dur) var(--yu-ease), transform var(--yu-dur) var(--yu-ease-spring), visibility var(--yu-dur);
}
.yu-dialog.is-open { opacity: 1; visibility: visible; transform: translate(-50%, -50%) scale(1); }
.yu-dialog__title { font-size: var(--yu-fs-h3); font-weight: 700; text-align: center; }
.yu-dialog__text { margin-top: 8px; font-size: var(--yu-fs-sm); line-height: 1.6; color: var(--yu-text-2); text-align: center; }
.yu-dialog__acts { display: flex; gap: 10px; margin-top: 20px; }
.yu-dialog__acts .yu-btn { flex: 1; }

.yu-sheet {
  position: fixed; z-index: var(--yu-z-modal);
  left: 50%; bottom: 0;
  width: min(var(--yu-shell), 100%);
  max-height: 82vh; overflow-y: auto;
  padding: 10px var(--yu-gutter) calc(18px + var(--yu-safe-bottom));
  border-radius: var(--yu-radius-xl) var(--yu-radius-xl) 0 0;
  background: var(--yu-surface);
  box-shadow: var(--yu-shadow-lg);
  transform: translate(-50%, 102%);
  transition: transform var(--yu-dur-slow) var(--yu-ease);
}
.yu-sheet.is-open { transform: translate(-50%, 0); }
.yu-sheet__grip { width: 38px; height: 4px; margin: 4px auto 12px; border-radius: 2px; background: var(--yu-line-strong); }
.yu-sheet__title { font-size: var(--yu-fs-h3); font-weight: 700; text-align: center; }
.yu-sheet__desc { margin-top: 4px; font-size: var(--yu-fs-caption); color: var(--yu-text-3); text-align: center; }
.yu-sheet__body { margin-top: 14px; }

.yu-toast {
  position: fixed; z-index: var(--yu-z-toast);
  left: 50%; bottom: calc(92px + var(--yu-safe-bottom));
  max-width: min(320px, calc(100vw - 48px));
  padding: 10px 16px;
  border-radius: var(--yu-radius-pill);
  background: rgba(38, 33, 27, .9); color: #fff;
  font-size: var(--yu-fs-caption); text-align: center;
  transform: translate(-50%, 8px);
  opacity: 0; visibility: hidden;
  transition: opacity var(--yu-dur) var(--yu-ease), transform var(--yu-dur) var(--yu-ease), visibility var(--yu-dur);
}
.yu-toast.is-open { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ==================== 17. 通用小件 ==================== */
.yu-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--yu-green-50); flex-shrink: 0; }
.yu-avatar--sm { width: 32px; height: 32px; }
.yu-avatar--lg { width: 64px; height: 64px; }
.yu-price { color: var(--yu-danger); font-weight: 700; font-variant-numeric: tabular-nums; }
.yu-price small { font-size: .64em; font-weight: 700; }
.yu-price--muted { color: var(--yu-ink-3); font-weight: 500; text-decoration: line-through; }
.yu-row { display: flex; align-items: center; gap: 10px; }
.yu-row--between { justify-content: space-between; }
.yu-grow { flex: 1; min-width: 0; }
.yu-hide { display: none !important; }

/* ==================== 18. 动效偏好 ==================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
