/* ============================================================
   田小润网页版 · 外壳 / 登录页 / 底部导航 / 通用 UI
   ============================================================ */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  overflow: hidden;
  background: #e9f1ea;
  color: #16211b;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font-family: inherit; }
a { color: inherit; }

.stage-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden;
  background:
    radial-gradient(900px 700px at 8% 2%, #d8f0df 0%, rgba(216,240,223,0) 60%),
    radial-gradient(760px 620px at 96% 6%, #dbe9f8 0%, rgba(219,233,248,0) 62%),
    radial-gradient(820px 680px at 88% 96%, #eee5fa 0%, rgba(238,229,250,0) 60%),
    radial-gradient(700px 600px at 2% 92%, #fbeed6 0%, rgba(251,238,214,0) 62%),
    linear-gradient(160deg, #eef5ee 0%, #edf3fa 48%, #f3edfa 100%);
}
.stage-bg .orb { position: absolute; border-radius: 50%; filter: blur(2px); opacity: .5; }
.orb-a { width: 280px; height: 280px; left: 6%; top: 14%; background: radial-gradient(circle at 35% 35%, rgba(74,201,135,.45), rgba(74,201,135,0) 68%); animation: floatA 12s ease-in-out infinite; }
.orb-b { width: 340px; height: 340px; right: 4%; top: 8%; background: radial-gradient(circle at 40% 40%, rgba(86,157,224,.35), rgba(86,157,224,0) 68%); animation: floatB 15s ease-in-out infinite; }
.orb-c { width: 300px; height: 300px; right: 14%; bottom: 6%; background: radial-gradient(circle at 50% 50%, rgba(166,132,230,.28), rgba(166,132,230,0) 68%); animation: floatA 18s ease-in-out infinite reverse; }
@keyframes floatA { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(18px,-22px,0); } }
@keyframes floatB { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(-24px,18px,0); } }

/* ================= 应用外壳 ================= */
.app-shell {
  --rpx: calc(min(100vw, 480px) / 750);
  position: relative;
  z-index: 2;
  width: min(100vw, 480px);
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  background: #f3f7f3;
  isolation: isolate;
  /* 作为内部 position:fixed 元素的包含块：既限制在手机框内，又不会随页面滚动而移动 */
  transform: translateZ(0);
  transition: width .38s cubic-bezier(.2,.7,.3,1), height .38s cubic-bezier(.2,.7,.3,1), border-radius .38s ease;
}
body.login-mode .app-shell {
  width: min(1200px, 96vw);
  max-width: 1200px;
  height: min(820px, 94dvh);
  border-radius: 30px;
  box-shadow: 0 40px 100px rgba(24, 62, 42, .22), 0 4px 18px rgba(24,62,42,.08);
}
#main-view, #page-stage, #page-host { position: absolute; inset: 0; }
#main-view { overflow: hidden; }
#page-host { display: block; }
#page-host::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; display: none; }
#main-view[hidden], #login-view[hidden], .dock[hidden], .loading-layer[hidden] { display: none !important; }

@media (min-width: 900px) and (min-height: 700px) {
  body.app-mode .app-shell {
    height: min(900px, calc(100dvh - 44px));
    border-radius: 38px;
    box-shadow: 0 34px 90px rgba(24, 62, 42, .2), 0 2px 10px rgba(24, 62, 42, .06), inset 0 0 0 1px rgba(255,255,255,.7);
  }
}
@media (max-width: 899px) {
  body.login-mode .app-shell { width: 100vw; height: 100dvh; border-radius: 0; box-shadow: none; }
}

/* ================= 桌面端适配（应用模式） =================
   思路：外壳放宽到桌面宽度，但 --rpx 只按 620px 基准缩放，
   避免内容随宽度等比放大成「巨字手机」；页面内部多为 flex
   流式布局，会自然横向铺开。手机端（<900px）完全不受影响。 */
@media (min-width: 900px) {
  body.app-mode .app-shell {
    --rpx: calc(620px / 750);
    width: min(1080px, 96vw);
    height: min(940px, calc(100dvh - 32px));
  }
  /* 底部操作菜单在宽屏下收成居中卡片，不再横贯整个外壳 */
  body.app-mode .ui-sheet-mask { justify-content: center; }
  body.app-mode .ui-sheet { width: min(520px, 100%); }
  /* 弹窗卡片在宽屏下略放宽 */
  body.app-mode .ui-modal-card { width: min(420px, 100%); }
}

/* ================= 登录页 ================= */
.login-view {
  position: absolute; inset: 0; z-index: 10;
  overflow-y: auto; overflow-x: hidden;
  background:
    radial-gradient(760px 600px at 6% 0%, rgba(120, 224, 176, .34) 0%, rgba(120,224,176,0) 64%),
    radial-gradient(700px 620px at 100% 6%, rgba(126, 192, 242, .3) 0%, rgba(126,192,242,0) 60%),
    radial-gradient(720px 680px at 90% 100%, rgba(190, 166, 236, .24) 0%, rgba(190,166,236,0) 62%),
    radial-gradient(620px 560px at 0% 96%, rgba(252, 206, 148, .24) 0%, rgba(252,206,148,0) 60%),
    linear-gradient(155deg, #edf6ef 0%, #eef4fb 52%, #f4effb 100%);
  -webkit-overflow-scrolling: touch;
}
.login-noise {
  position: absolute; inset: 0; pointer-events: none; opacity: .6;
  background-image: radial-gradient(rgba(18,60,38,.05) .6px, transparent .6px);
  background-size: 14px 14px;
  mask-image: linear-gradient(180deg, rgba(0,0,0,.5), transparent 70%);
}
.login-shell {
  position: relative; z-index: 2;
  min-height: 100%;
  display: grid;
  grid-template-columns: 1.02fr .98fr;
  align-items: stretch;
  gap: 26px;
  padding: 34px 34px 34px 44px;
}

/* ---- 品牌区 ---- */
.login-brand { display: flex; flex-direction: column; padding: 24px 26px 18px 14px; min-width: 0; }
.brand-top { display: flex; align-items: center; gap: 14px; }
.brand-logo {
  position: relative; width: 54px; height: 54px; border-radius: 16px; flex: 0 0 auto;
  background: linear-gradient(145deg, #2fb071 0%, #0c7249 100%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.38), 0 12px 26px rgba(14,122,80,.28);
  display: flex; align-items: center; justify-content: center;
}
.brand-logo .logo-leaf {
  width: 26px; height: 26px; background: #fff; border-radius: 0 26px 0 26px;
  transform: rotate(45deg); opacity: .97;
}
.brand-logo .logo-drop {
  position: absolute; right: 8px; bottom: 8px; width: 12px; height: 12px;
  background: #9be7bb; border-radius: 0 12px 12px 12px; transform: rotate(45deg);
}
.brand-logo.sm { width: 42px; height: 42px; border-radius: 13px; }
.brand-logo.sm .logo-leaf { width: 20px; height: 20px; border-radius: 0 20px 0 20px; }
.brand-logo.sm .logo-drop { width: 9px; height: 9px; right: 6px; bottom: 6px; }
.brand-word { display: flex; flex-direction: column; line-height: 1.05; }
.brand-word strong { font-size: 22px; letter-spacing: 3px; color: #10251a; }
.brand-word em { margin-top: 5px; font-style: normal; font-size: 9px; letter-spacing: 2.4px; color: #6c8b78; font-weight: 700; }

.brand-copy { margin-top: 58px; }
.brand-eyebrow { margin: 0 0 18px; font-size: 10.5px; letter-spacing: 3.2px; font-weight: 800; color: #1c8f60; }
.brand-copy h1 {
  margin: 0; font-size: clamp(36px, 4.2vw, 52px); line-height: 1.16; letter-spacing: -1.6px;
  font-weight: 800; color: #0f2418;
}
.brand-copy h1 span {
  background: linear-gradient(105deg, #15a465 0%, #0c7249 52%, #2d8f68 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand-desc { margin: 20px 0 0; font-size: 14.5px; line-height: 1.85; color: #64796b; }

.brand-features { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 18px; }
.brand-features li { display: flex; align-items: center; gap: 13px; }
.feature-ico {
  width: 38px; height: 38px; border-radius: 12px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center;
  color: #15855a;
  background: rgba(255,255,255,.66);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.9), 0 6px 16px rgba(24,80,52,.08);
}
.feature-ico svg { width: 21px; height: 21px; }
.brand-features strong { display: block; font-size: 14px; color: #1b3325; letter-spacing: .2px; }
.brand-features small { display: block; margin-top: 3px; font-size: 11.5px; color: #829186; }

.brand-foot {
  margin-top: auto; padding-top: 28px;
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; color: #6f8576;
}
.dot-live { width: 7px; height: 7px; border-radius: 50%; background: #23b377; box-shadow: 0 0 0 4px rgba(35,179,119,.13); animation: livePulse 2.6s ease-in-out infinite; }
@keyframes livePulse { 0%,100% { box-shadow: 0 0 0 4px rgba(35,179,119,.13); } 50% { box-shadow: 0 0 0 7px rgba(35,179,119,.05); } }
.brand-ver { margin-left: auto; padding: 4px 9px; border-radius: 20px; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); font-size: 10px; letter-spacing: .6px; color: #7b8f81; }

/* ---- 表单卡 ---- */
.login-card {
  position: relative;
  align-self: center;
  width: 100%;
  max-width: 440px;
  margin: 0 auto;
  padding: 34px 34px 24px;
  border-radius: 30px;
  background: rgba(255,255,255,.72);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.92),
    inset 0 2px 2px rgba(255,255,255,.9),
    0 28px 60px rgba(30, 72, 52, .14),
    0 4px 14px rgba(30, 72, 52, .05);
  overflow: hidden;
}
.card-glow {
  position: absolute; width: 200px; height: 200px; right: -70px; top: -90px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47,176,113,.22), rgba(47,176,113,0) 68%); pointer-events: none;
}
.mobile-brand { display: none; align-items: center; gap: 11px; margin-bottom: 24px; }
.mobile-brand strong { display: block; font-size: 17px; letter-spacing: 1.5px; color: #12291c; }
.mobile-brand small { display: block; margin-top: 3px; font-size: 10px; color: #7c8f82; letter-spacing: .6px; }

.login-head h2 { margin: 0; font-size: 27px; letter-spacing: -0.6px; color: #10241a; font-weight: 800; }
.login-head p { margin: 9px 0 0; font-size: 13px; color: #809086; line-height: 1.6; }

.login-tabs {
  position: relative; display: flex; gap: 4px; margin: 24px 0 20px; padding: 4px;
  border-radius: 14px; background: rgba(22,60,40,.055);
}
.login-tab {
  flex: 1; height: 38px; border: 0; border-radius: 11px; background: transparent;
  font-size: 13px; font-weight: 600; color: #7a8c7f; cursor: pointer; transition: .22s;
}
.login-tab.active {
  background: #fff; color: #0f7a4f; font-weight: 700;
  box-shadow: 0 3px 10px rgba(20,70,46,.1), inset 0 0 0 1px rgba(255,255,255,.9);
}

.field { display: block; margin-bottom: 15px; }
.field-label { display: block; margin: 0 0 7px 3px; font-size: 12px; font-weight: 600; color: #4f6658; }
.input-wrap {
  display: flex; align-items: center; height: 52px; padding: 0 14px;
  border-radius: 14px; background: rgba(255,255,255,.78);
  box-shadow: inset 0 0 0 1px #e0e9e1, inset 0 2px 5px rgba(22,60,38,.03);
  transition: box-shadow .2s, background .2s;
}
.input-wrap:focus-within {
  background: #fff; box-shadow: inset 0 0 0 1.5px #29a873, 0 0 0 4px rgba(41,168,115,.11);
}
.input-wrap .prefix {
  padding-right: 10px; margin-right: 10px; font-size: 13.5px; font-weight: 700; color: #263e2f;
  border-right: 1px solid #e3eae3;
}
.input-wrap input {
  flex: 1; min-width: 0; height: 100%; border: 0; outline: none; background: transparent;
  font-size: 14.5px; color: #17271d; letter-spacing: .2px;
}
.input-wrap input::placeholder { color: #a4b0a6; font-size: 13.5px; }
.send-code, .forgot {
  flex: 0 0 auto; border: 0; background: transparent; cursor: pointer;
  font-size: 12.5px; font-weight: 700; color: #12855c; padding: 6px 2px 6px 10px; white-space: nowrap;
}
.send-code:disabled { color: #a7b3a9; cursor: default; }
.forgot { color: #7b8d80; font-weight: 600; }

.login-error {
  margin: -3px 0 12px; padding: 9px 12px; border-radius: 10px;
  background: rgba(211,74,47,.08); color: #c0392b; font-size: 12px; line-height: 1.5;
}
.shake { animation: shakeX .32s ease; }
@keyframes shakeX { 0%,100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }

.agree-row { display: flex; align-items: flex-start; gap: 8px; margin: 4px 0 18px; font-size: 11.5px; line-height: 1.5; color: #7b8d80; cursor: pointer; }
.agree-row input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: #178a5d; flex: 0 0 auto; }
.agree-row a { color: #12855c; text-decoration: none; }
.agree-row a:hover { text-decoration: underline; }

.login-submit {
  position: relative; width: 100%; height: 52px; border: 0; border-radius: 15px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #2cb474 0%, #0b7148 100%);
  color: #fff; font-size: 15.5px; font-weight: 700; letter-spacing: 4px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 12px 24px rgba(14,110,72,.26);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.login-submit:hover { filter: brightness(1.03); box-shadow: inset 0 1px 0 rgba(255,255,255,.34), 0 15px 30px rgba(14,110,72,.3); }
.login-submit:active { transform: translateY(1px) scale(.995); }
.login-submit:disabled { cursor: default; filter: saturate(.85); opacity: .86; }
.btn-spinner { display: none; width: 15px; height: 15px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: spin .8s linear infinite; }
.login-submit.loading .btn-spinner { display: inline-block; }
.login-submit.loading span { letter-spacing: 1px; }
@keyframes spin { to { transform: rotate(360deg); } }

.login-or { position: relative; margin: 20px 0 15px; text-align: center; }
.login-or::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; height: 1px; background: linear-gradient(90deg, transparent, #e4ebe4 20%, #e4ebe4 80%, transparent); }
.login-or span { position: relative; padding: 0 10px; background: rgba(255,255,255,.72); font-size: 11px; color: #9aa89e; }

.demo-login {
  width: 100%; height: 48px; border-radius: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid #dbe7dd; background: rgba(255,255,255,.62);
  color: #2c4a37; font-size: 13.5px; font-weight: 600;
  transition: .2s;
}
.demo-login:hover { background: #fff; border-color: #bfdbc8; }
.demo-login:active { transform: translateY(1px); }
.demo-ico {
  width: 23px; height: 23px; border-radius: 8px; background: linear-gradient(135deg, #e3f5e9, #cdecd9);
  color: #108254; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.login-hint { margin: 13px 0 0; text-align: center; font-size: 11px; line-height: 1.75; color: #93a196; }
.login-hint b { color: #12855c; font-weight: 700; }
.login-meta { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; padding-top: 14px; border-top: 1px solid #eef2ee; font-size: 10.5px; color: #a0aca2; }
.secure { display: inline-flex; align-items: center; gap: 5px; }
.secure i { width: 5px; height: 5px; border-radius: 50%; background: #37b87f; }

@media (max-width: 899px) {
  .login-shell { grid-template-columns: 1fr; padding: 0; gap: 0; }
  .login-brand { display: none; }
  .login-card {
    max-width: 460px; margin: auto; padding: 26px 22px 18px; border-radius: 0;
    background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none;
    min-height: 100%; display: flex; flex-direction: column; justify-content: center;
  }
  .card-glow { display: none; }
  .mobile-brand { display: flex; }
  .login-head h2 { font-size: 25px; }
  .login-meta { margin-top: auto; }
}
@media (min-width: 900px) and (max-height: 760px) {
  .brand-copy { margin-top: 32px; }
  .brand-copy h1 { font-size: 40px; }
  .brand-features { margin-top: 26px; gap: 13px; }
  .login-card { padding: 26px 30px 20px; }
}

/* ================= 底部导航 ================= */
.dock {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 50;
  height: calc(128 * var(--rpx) + env(safe-area-inset-bottom));
  padding: calc(12 * var(--rpx)) calc(28 * var(--rpx)) calc(12 * var(--rpx) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: calc(22 * var(--rpx));
  background: linear-gradient(105deg, rgba(226,246,233,.9) 0%, rgba(228,240,252,.88) 52%, rgba(238,232,250,.88) 100%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  backdrop-filter: blur(28px) saturate(200%);
  box-shadow: inset 0 2px 0 rgba(255,255,255,.92), inset 0 -1px 0 rgba(120,190,150,.18), 0 -8px 34px rgba(18,60,38,.12);
}
.dock::before {
  content: ""; position: absolute; left: calc(28 * var(--rpx)); right: calc(28 * var(--rpx)); top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.95) 22%, rgba(255,255,255,.95) 78%, transparent);
}
.ai-orb { position: relative; flex: 0 0 calc(100 * var(--rpx)); width: calc(100 * var(--rpx)); height: calc(100 * var(--rpx)); display: flex; align-items: center; justify-content: center; cursor: pointer; }
.ai-ring { position: absolute; border-radius: 50%; }
.ring-1 { inset: 0; border: calc(5 * var(--rpx)) solid transparent; border-top-color: #2aa971; border-right-color: #7fd9b3; animation: aiSpin 3.2s linear infinite; }
.ring-2 { inset: calc(8 * var(--rpx)); border: calc(4 * var(--rpx)) solid transparent; border-bottom-color: #4a9fe0; border-left-color: #a8d6f5; animation: aiSpin 2.4s linear infinite reverse; }
.ring-3 { inset: calc(16 * var(--rpx)); border: calc(3 * var(--rpx)) solid transparent; border-top-color: #f0b95c; border-right-color: #f7dca8; animation: aiSpin 4s linear infinite; }
.ai-core {
  position: relative; z-index: 2; width: calc(62 * var(--rpx)); height: calc(62 * var(--rpx)); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #2fae76 0%, #0e7a50 100%);
  box-shadow: inset 0 2px 6px rgba(255,255,255,.55), 0 6px 16px rgba(14,122,80,.38);
  animation: aiBreathe 4s ease-in-out infinite;
}
.ai-core-txt { color: #fff; font-size: calc(30 * var(--rpx)); font-weight: 800; letter-spacing: 1px; text-shadow: 0 1px 2px rgba(0,0,0,.15); }
.ai-orb:active .ai-core { transform: scale(.92); }
@keyframes aiSpin { to { transform: rotate(360deg); } }
@keyframes aiBreathe {
  0%,100% { box-shadow: inset 0 2px 6px rgba(255,255,255,.55), 0 6px 16px rgba(14,122,80,.34); }
  50% { box-shadow: inset 0 2px 6px rgba(255,255,255,.55), 0 6px 26px rgba(14,122,80,.6); }
}
.tab-box {
  flex: 1; min-width: 0; height: calc(96 * var(--rpx)); display: flex; align-items: center; justify-content: space-around;
  padding: 0 calc(8 * var(--rpx)); border-radius: calc(28 * var(--rpx));
  background: rgba(255,255,255,.52); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.75), inset 0 2px 6px rgba(255,255,255,.6), 0 6px 20px rgba(18,60,38,.08);
}
.tab-item { flex: 1; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: calc(4 * var(--rpx)); border-radius: calc(24 * var(--rpx)); cursor: pointer; transition: background .25s; }
.tab-item.active { background: rgba(46,168,113,.12); }
.tab-item:active { background: rgba(46,168,113,.18); }
.tab-ico { width: calc(42 * var(--rpx)); height: calc(42 * var(--rpx)); object-fit: contain; }
.tab-txt { font-size: calc(20 * var(--rpx)); line-height: 1.2; color: #98a29a; white-space: nowrap; }
.tab-item.active .tab-txt { color: #12855c; font-weight: 700; }
.tab-divider { width: 2px; height: calc(44 * var(--rpx)); background: linear-gradient(180deg, transparent, rgba(18,60,38,.12), transparent); }
.dock-elder { height: calc(136 * var(--rpx) + env(safe-area-inset-bottom)); gap: calc(24 * var(--rpx)); }
.dock-elder .ai-orb { flex-basis: calc(112 * var(--rpx)); width: calc(112 * var(--rpx)); height: calc(112 * var(--rpx)); }
.dock-elder .ai-core { width: calc(70 * var(--rpx)); height: calc(70 * var(--rpx)); }
.dock-elder .ai-core-txt { font-size: calc(34 * var(--rpx)); }
.dock-elder .tab-box { height: calc(104 * var(--rpx)); }
.dock-elder .tab-ico { width: calc(48 * var(--rpx)); height: calc(48 * var(--rpx)); }
.dock-elder .tab-txt { font-size: calc(24 * var(--rpx)); }
.dock:not(.dock-elder) .tab-ico { animation: dockFloat 4s ease-in-out infinite; will-change: transform; }
@keyframes dockFloat { 0%,100% { transform: translate3d(0,0,0); } 50% { transform: translate3d(0,-4px,0); } }

/* ================= Toast / Loading ================= */
.toast-layer { position: absolute; inset: 0; z-index: 900; pointer-events: none; display: flex; align-items: flex-end; justify-content: center; padding-bottom: calc(170 * var(--rpx) + env(safe-area-inset-bottom)); }
.ui-toast {
  max-width: 80%; display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 18px; border-radius: 12px;
  background: rgba(18, 32, 24, .88); color: #fff; font-size: 13px; line-height: 1.45;
  box-shadow: 0 10px 30px rgba(0,0,0,.2); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  opacity: 0; transform: translateY(10px) scale(.98); transition: .22s ease;
}
.ui-toast.in { opacity: 1; transform: translateY(0) scale(1); }
.ui-toast.is-success { background: rgba(11, 112, 73, .94); }
.ui-toast.is-error { background: rgba(176, 48, 32, .94); }
.ui-toast-ico { width: 18px; height: 18px; border-radius: 50%; background: rgba(255,255,255,.2); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }

.loading-layer { position: absolute; inset: 0; z-index: 950; background: rgba(16, 30, 22, .18); display: flex; align-items: center; justify-content: center; -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.loading-layer.no-mask { background: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; pointer-events: none; }
.ui-loading-card { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 22px 26px; border-radius: 16px; background: rgba(24, 38, 30, .86); color: #fff; font-size: 12.5px; box-shadow: 0 16px 40px rgba(0,0,0,.24); }
.ui-spinner { width: 26px; height: 26px; border-radius: 50%; border: 2.5px solid rgba(255,255,255,.22); border-top-color: #7ee2b1; animation: spin .9s linear infinite; }

/* ================= Modal / ActionSheet ================= */
.modal-layer { position: absolute; inset: 0; z-index: 980; pointer-events: none; }
.modal-layer > * { pointer-events: auto; }
.ui-modal-mask, .ui-sheet-mask, .ui-preview {
  position: absolute; inset: 0; background: rgba(12, 24, 17, .42);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 22px;
  opacity: 0; transition: opacity .18s ease;
}
.ui-modal-mask.in, .ui-sheet-mask.in { opacity: 1; }
.ui-modal-card {
  width: min(360px, 100%); max-height: 82%; overflow-y: auto;
  padding: 22px 20px 16px; border-radius: 20px;
  background: rgba(255,255,255,.96); box-shadow: 0 26px 70px rgba(10,35,22,.28), inset 0 0 0 1px rgba(255,255,255,.9);
  transform: translateY(8px) scale(.98); transition: transform .18s ease;
}
.ui-modal-mask.in .ui-modal-card { transform: translateY(0) scale(1); }
.ui-modal-title { font-size: 16px; font-weight: 800; color: #12251a; margin-bottom: 10px; line-height: 1.4; }
.ui-modal-body { font-size: 13px; line-height: 1.75; color: #54685b; white-space: pre-line; word-break: break-word; }
.ui-modal-input { width: 100%; height: 88px; margin-top: 12px; padding: 10px 12px; resize: none; border-radius: 10px; border: 1px solid #dde7df; outline: none; background: #f8fbf8; font-size: 13px; line-height: 1.6; color: #1c2f23; }
.ui-modal-input:focus { border-color: #2aa873; box-shadow: 0 0 0 3px rgba(42,168,115,.1); }
.ui-modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.ui-modal-btn { flex: 1; height: 42px; border: 0; border-radius: 11px; cursor: pointer; font-size: 13.5px; font-weight: 600; }
.ui-modal-btn.cancel { background: #f0f4f0; color: #5b6d60; }
.ui-modal-btn.confirm { background: linear-gradient(135deg, #2cb474, #0b7148); color: #fff; box-shadow: 0 6px 14px rgba(14,110,72,.18); }
.ui-modal-btn.cam { background: #e7f4ec; color: #12754e; }

.ui-sheet-mask { align-items: flex-end; padding: 10px; }
.ui-sheet { width: 100%; border-radius: 16px; overflow: hidden; background: #fff; box-shadow: 0 20px 50px rgba(0,0,0,.25); transform: translateY(12px); transition: transform .2s ease; }
.ui-sheet-mask.in .ui-sheet { transform: translateY(0); }
.ui-sheet-list { display: flex; flex-direction: column; }
.ui-sheet-item { height: 50px; border: 0; border-bottom: 1px solid #f0f3f0; background: #fff; color: #26392c; font-size: 14px; cursor: pointer; }
.ui-sheet-item:active { background: #f3f8f4; }
.ui-sheet-cancel { width: 100%; height: 50px; border: 0; border-top: 6px solid #f4f6f4; background: #fff; color: #7c8c80; font-size: 14px; cursor: pointer; }

.ui-preview { background: rgba(0,0,0,.86); z-index: 990; }
.ui-preview img { max-width: 92%; max-height: 82%; border-radius: 10px; object-fit: contain; }
.ui-preview-close { position: absolute; top: 18px; right: 18px; width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; cursor: pointer; }

.ui-scan-card { padding-bottom: 14px; }
.ui-scan-stage { position: relative; border-radius: 14px; overflow: hidden; background: #0f1d16; aspect-ratio: 4/3; margin: 10px 0; display: flex; align-items: center; justify-content: center; }
.ui-scan-stage video { width: 100%; height: 100%; object-fit: cover; }
.ui-scan-frame { position: absolute; width: 58%; height: 52%; border: 2px solid rgba(126,226,177,.9); border-radius: 10px; box-shadow: 0 0 0 999px rgba(0,0,0,.28); }
.ui-scan-hint { position: absolute; bottom: 10px; left: 0; right: 0; text-align: center; color: rgba(255,255,255,.8); font-size: 11px; }
.ui-scan-input { width: 100%; height: 44px; border-radius: 10px; border: 1px solid #dde7df; background: #f8fbf8; padding: 0 12px; font-size: 13px; outline: none; }
.ui-scan-input:focus { border-color: #2aa873; }
.ui-scan-msg { min-height: 18px; margin-top: 7px; font-size: 11px; color: #728477; line-height: 1.45; }

/* ================= 启动屏 ================= */
.boot-screen {
  position: absolute; inset: 0; z-index: 1000; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; background:
    radial-gradient(500px 400px at 30% 20%, #e0f5e8, rgba(224,245,232,0) 70%),
    radial-gradient(480px 420px at 80% 80%, #e6eefb, rgba(230,238,251,0) 70%),
    #f3f8f3;
  transition: opacity .4s ease, visibility .4s;
}
.boot-screen.hide { opacity: 0; visibility: hidden; }
.boot-logo { position: relative; width: 62px; height: 62px; border-radius: 19px; background: linear-gradient(145deg,#2fb071,#0c7249); display: flex; align-items: center; justify-content: center; box-shadow: 0 16px 34px rgba(14,122,80,.28); }
.boot-logo .logo-leaf { width: 30px; height: 30px; background: #fff; border-radius: 0 30px 0 30px; transform: rotate(45deg); }
.boot-logo .logo-drop { position: absolute; right: 9px; bottom: 9px; width: 13px; height: 13px; background: #9be7bb; border-radius: 0 13px 13px 13px; transform: rotate(45deg); }
.boot-name { margin-top: 12px; font-size: 21px; font-weight: 800; letter-spacing: 5px; color: #12291c; }
.boot-sub { font-size: 11.5px; letter-spacing: 1px; color: #819487; }
.boot-bar { width: 92px; height: 3px; margin-top: 16px; border-radius: 3px; background: rgba(20,80,50,.1); overflow: hidden; }
.boot-bar i { display: block; width: 40%; height: 100%; border-radius: 3px; background: linear-gradient(90deg,#38b979,#0e7a50); animation: bootSlide 1.1s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(250%); } }
