/* 向阳花园 · 设计系统：奶油底 + 叶绿主色 + 阳光金 + 拖延怪紫 */
:root {
  --bg: #f5f3ea; --paper: #fffdf8; --card: #ffffff; --ink: #1c2a21; --ink2: #536357; --ink3: #8b988e;
  --line: #e9e5d8; --line2: #f1eee5;
  --g1: #2f9e62; --g2: #1f7a4a; --g0: #e6f5ec; --g00: #f2faf5; --leaf: #7cc36a;
  --sun: #f5b324; --sun2: #e08f0b; --sun0: #fff4d8;
  --grape: #7a67ee; --grape2: #5a45cf; --grape0: #efecff;
  --rose: #ec5b64; --rose0: #ffeced; --teal: #23a594; --teal0: #e2f6f3; --sky: #3d8bfd; --sky0: #e8f1ff;
  --r: 20px; --r-sm: 13px; --r-xs: 9px;
  --sh1: 0 1px 2px rgba(28, 42, 33, .04), 0 6px 18px rgba(28, 42, 33, .05);
  --sh2: 0 2px 6px rgba(28, 42, 33, .05), 0 18px 40px rgba(28, 42, 33, .10);
  --sh-sun: 0 8px 22px rgba(245, 179, 36, .35);
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "MiSans", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); color: var(--ink); font-size: 14px; line-height: 1.6;
  background: var(--bg);
  background-image: radial-gradient(900px 500px at 0% -10%, rgba(124, 195, 106, .14), transparent 60%),
                    radial-gradient(800px 480px at 100% -5%, rgba(245, 179, 36, .12), transparent 60%);
  background-attachment: fixed; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; letter-spacing: .01em; }
p { margin: 0; }
svg { display: block; }
::selection { background: rgba(47, 158, 98, .2); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.muted { color: var(--ink3); }
.sub { color: var(--ink2); }
.small { font-size: 12px; }
.hide { display: none !important; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.stack > * + * { margin-top: 14px; }
.grid { display: grid; gap: 18px; }
.ic { width: 18px; height: 18px; flex: none; }
.ic-sm { width: 14px; height: 14px; flex: none; }
.ic-lg { width: 22px; height: 22px; flex: none; }

/* ---------- 基础组件 ---------- */
.card {
  background: var(--card); border: 1px solid var(--line2); border-radius: var(--r); box-shadow: var(--sh1);
  padding: 20px; position: relative;
}
.card-h { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-h h3 { font-size: 16px; font-weight: 700; }
.card-h .sub { font-size: 12.5px; }
.card-h .more { margin-left: auto; font-size: 12.5px; color: var(--ink3); display: inline-flex; align-items: center; gap: 2px; transition: color .2s; }
.card-h .more:hover { color: var(--g1); }
.card-h .ic-badge { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--g0); color: var(--g1); }
.card-h .ic-badge.sun { background: var(--sun0); color: var(--sun2); }
.card-h .ic-badge.grape { background: var(--grape0); color: var(--grape); }
.card-h .ic-badge.rose { background: var(--rose0); color: var(--rose); }
.card-h .ic-badge.teal { background: var(--teal0); color: var(--teal); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 40px; padding: 0 18px;
  border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 14px;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, opacity .2s; white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: #d7d2c2; box-shadow: var(--sh1); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .55; pointer-events: none; }
.btn .ic { width: 17px; height: 17px; }
.btn-primary { background: linear-gradient(180deg, #37ab6c, #2a925a); border-color: transparent; color: #fff; box-shadow: 0 6px 16px rgba(47, 158, 98, .28), inset 0 1px 0 rgba(255,255,255,.18); }
.btn-primary:hover { box-shadow: 0 8px 22px rgba(47, 158, 98, .36), inset 0 1px 0 rgba(255,255,255,.18); border-color: transparent; }
.btn-sun { background: linear-gradient(180deg, #ffc443, #f2a516); border-color: transparent; color: #4a3200; box-shadow: var(--sh-sun), inset 0 1px 0 rgba(255,255,255,.35); }
.btn-sun:hover { border-color: transparent; box-shadow: 0 10px 26px rgba(245, 179, 36, .45); }
.btn-grape { background: linear-gradient(180deg, #8a79f5, #6b57e6); color: #fff; border-color: transparent; box-shadow: 0 6px 16px rgba(122, 103, 238, .3); }
.btn-danger { color: var(--rose); border-color: #f6cfd2; background: #fff; }
.btn-danger:hover { background: var(--rose0); border-color: #f1b7bb; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink2); }
.btn-ghost:hover { background: rgba(28, 42, 33, .05); box-shadow: none; border-color: transparent; }
.btn-soft { background: var(--g0); border-color: transparent; color: var(--g2); }
.btn-soft:hover { background: #d8efe1; border-color: transparent; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 10px; }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; border-radius: 15px; }
.btn-block { width: 100%; }
.btn-icon { width: 40px; padding: 0; }
.btn-icon.btn-sm { width: 32px; }
.is-loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
  font-size: 12px; font-weight: 600; background: var(--line2); color: var(--ink2); white-space: nowrap;
}
.chip .ic-sm { width: 13px; height: 13px; }
.chip-g { background: var(--g0); color: var(--g2); }
.chip-sun { background: var(--sun0); color: #a86a00; }
.chip-grape { background: var(--grape0); color: var(--grape2); }
.chip-rose { background: var(--rose0); color: #c7323c; }
.chip-teal { background: var(--teal0); color: #13786b; }
.chip-sky { background: var(--sky0); color: #2569d6; }
.chip-dark { background: #23332a; color: #fff; }
.chip-ai { background: linear-gradient(90deg, #efeaff, #e6f6ff); color: #5a45cf; font-size: 11px; height: 20px; padding: 0 7px; }
.chip-ai::before { content: "✦"; font-size: 10px; }
.chip-rule { background: #f1efe8; color: var(--ink3); font-size: 11px; height: 20px; padding: 0 7px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; flex: none; }

.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 0 14px; height: 44px;
  transition: border-color .2s, box-shadow .2s; outline: none;
}
.textarea { padding: 12px 14px; height: auto; min-height: 110px; resize: vertical; line-height: 1.7; }
.input:focus, .textarea:focus, .select:focus { border-color: #8fd0a9; box-shadow: 0 0 0 4px rgba(47, 158, 98, .12); }
.label { display: block; font-size: 13px; font-weight: 600; color: var(--ink2); margin-bottom: 7px; }
.field + .field { margin-top: 16px; }
.hint { font-size: 12px; color: var(--ink3); margin-top: 6px; }

.bar { height: 8px; border-radius: 99px; background: var(--line2); overflow: hidden; position: relative; }
.bar > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: linear-gradient(90deg, #5fc27e, #2f9e62); transform-origin: left; animation: grow-x 1.1s var(--ease) both; }
.bar.sun > i { background: linear-gradient(90deg, #ffd25e, #f5a91b); }
.bar.rose > i { background: linear-gradient(90deg, #ff9aa0, #ec5b64); }
.bar.grape > i { background: linear-gradient(90deg, #b2a6ff, #7a67ee); }

.avatar {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 13px;
  color: #fff; flex: none; background: linear-gradient(135deg, #64c08a, #2f9e62);
}
.avatar.lg { width: 64px; height: 64px; border-radius: 20px; font-size: 20px; }
.avatar.sm { width: 28px; height: 28px; border-radius: 9px; font-size: 11px; }

.empty { text-align: center; padding: 34px 10px; color: var(--ink3); }
.empty svg.art { width: 92px; height: 92px; margin: 0 auto 10px; opacity: .9; }
.empty b { display: block; color: var(--ink2); font-size: 15px; margin-bottom: 4px; }

.ai-mark { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #6b5bd6; }

/* ---------- 动效 ---------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes grow-x { from { transform: scaleX(0); } }
@keyframes fade-up { from { opacity: 0; transform: translateY(14px); } }
@keyframes pop-in { 0% { opacity: 0; transform: scale(.6); } 70% { opacity: 1; transform: scale(1.06); } 100% { transform: scale(1); } }
@keyframes sway { 0%, 100% { transform: rotate(-2.5deg); } 50% { transform: rotate(2.5deg); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes float-cloud { from { transform: translateX(calc(-30vw / var(--zoom))); } to { transform: translateX(calc(130vw / var(--zoom))); } }
@keyframes rays { to { transform: rotate(360deg); } }
@keyframes pulse-ring { 0% { box-shadow: 0 0 0 0 rgba(236, 91, 100, .45); } 100% { box-shadow: 0 0 0 14px rgba(236, 91, 100, 0); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-5px) rotate(-3deg); } 40% { transform: translateX(5px) rotate(3deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }
@keyframes chomp { 0%, 100% { transform: scaleY(1); } 50% { transform: scaleY(.3); } }
@keyframes grow-plant { 0% { transform: scale(0) translateY(20px); opacity: 0; } 60% { transform: scale(1.15); opacity: 1; } 100% { transform: scale(1); } }
@keyframes mote { 0% { transform: translateY(0) scale(.6); opacity: 0; } 20% { opacity: .9; } 100% { transform: translateY(-120px) scale(1); opacity: 0; } }
@keyframes shimmer { from { background-position: -200% 0; } to { background-position: 200% 0; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-8deg); } 75% { transform: rotate(8deg); } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
@keyframes walk { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-4px) rotate(2deg); } }
@keyframes coin { 0% { opacity: 0; transform: translate(0, 0) scale(.4); } 15% { opacity: 1; transform: translate(0, -20px) scale(1); } 100% { opacity: .9; transform: translate(var(--tx), var(--ty)) scale(.5); } }
.reveal { animation: fade-up .7s var(--ease) both; animation-delay: calc(var(--i, 0) * 70ms); }
.shimmer {
  color: transparent; background: linear-gradient(90deg, #b9c3bc 20%, #e9eee9 40%, #b9c3bc 60%) 0 0 / 200% 100%;
  -webkit-background-clip: text; background-clip: text; animation: shimmer 1.6s linear infinite;
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- 提示与弹窗 ---------- */
.toasts { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 11px 18px 11px 12px; border-radius: 16px; background: rgba(28, 42, 33, .92);
  color: #fff; font-weight: 600; box-shadow: var(--sh2); backdrop-filter: blur(10px); animation: pop-in .45s var(--spring) both; max-width: calc(88vw / var(--zoom));
}
.toast .t-ic { width: 26px; height: 26px; border-radius: 9px; display: grid; place-items: center; background: rgba(255,255,255,.14); flex: none; }
.toast.ok .t-ic { background: #2f9e62; } .toast.err .t-ic { background: var(--rose); } .toast.sun .t-ic { background: #ffc53d; }
.toast.out { opacity: 0; transform: translateY(-10px); transition: .3s; }
.modal-root { position: fixed; inset: 0; z-index: 150; display: none; }
.modal-root.open { display: block; }
.modal-mask { position: absolute; inset: 0; background: rgba(22, 34, 26, .38); backdrop-filter: blur(4px); animation: fade-up .3s both; animation-name: fade-in; }
@keyframes fade-in { from { opacity: 0; } }
.modal {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(480px, calc(calc(100vw / var(--zoom)) - 28px));
  max-height: calc(calc(100vh / var(--zoom)) - 40px); overflow: auto; background: var(--paper); border-radius: 26px; box-shadow: 0 30px 80px rgba(20, 30, 24, .3);
  animation: modal-in .45s var(--spring) both;
}
.modal.wide { width: min(640px, calc(calc(100vw / var(--zoom)) - 28px)); }
@keyframes modal-in { from { opacity: 0; transform: translate(-50%, -46%) scale(.94); } }
.modal-h { padding: 22px 24px 4px; display: flex; align-items: flex-start; gap: 12px; }
.modal-h h3 { font-size: 18px; }
.modal-h .x { margin-left: auto; width: 34px; height: 34px; border-radius: 11px; border: 0; background: var(--line2); display: grid; place-items: center; color: var(--ink2); }
.modal-b { padding: 14px 24px 8px; }
.modal-f { padding: 14px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; }

/* ---------- 登录页 ---------- */
.login { min-height: calc(100vh / var(--zoom)); display: grid; grid-template-columns: 1.15fr 1fr; }
.login-art { position: relative; overflow: hidden; background: linear-gradient(180deg, #bfe6ff 0%, #e4f6ff 48%, #f3fbf3 70%); display: flex; flex-direction: column; justify-content: flex-end; }
.login-art .brand { position: absolute; top: 36px; left: 44px; z-index: 3; display: flex; align-items: center; gap: 12px; }
.login-art .brand svg { width: 46px; height: 46px; }
.login-art .brand b { font-size: 22px; letter-spacing: .06em; }
.login-art .brand span { display: block; font-size: 12.5px; color: #4d6a5a; letter-spacing: .02em; }
.login-copy { position: absolute; top: 120px; left: 44px; right: 44px; z-index: 3; }
.login-copy h1 { font-size: clamp(30px, calc(3.4vw / var(--zoom)), 46px); line-height: 1.25; font-weight: 800; letter-spacing: .02em; }
.login-copy h1 em { font-style: normal; background: linear-gradient(90deg, #f29d0b, #f5b324); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-copy p { margin-top: 14px; color: #3f5a4a; font-size: 15.5px; max-width: 460px; }
.login-stats { display: flex; gap: 12px; margin-top: 26px; flex-wrap: wrap; }
.login-stats div { background: rgba(255,255,255,.72); backdrop-filter: blur(8px); border: 1px solid rgba(255,255,255,.9); border-radius: 16px; padding: 10px 16px; box-shadow: var(--sh1); }
.login-stats b { font-size: 22px; display: block; line-height: 1.2; }
.login-stats span { font-size: 12px; color: var(--ink2); }
.login-scene { position: relative; height: 46%; min-height: 280px; }
.login-scene .ground { position: absolute; left: -5%; right: -5%; bottom: 0; height: 64%; background: linear-gradient(180deg, #8fd47c, #69bd5c); border-radius: 50% 50% 0 0 / 22% 22% 0 0; }
.login-scene .ground::after { content: ""; position: absolute; inset: 18% 0 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.07) 0 60px, transparent 60px 120px); }
.login-scene .lp { position: absolute; bottom: 18%; width: 92px; height: 92px; transform-origin: 50% 100%; animation: sway 3.2s ease-in-out infinite; z-index: 2; }
.login-scene .lm { position: absolute; bottom: 20%; right: 7%; width: 110px; height: 104px; animation: walk 1.4s ease-in-out infinite; z-index: 2; }
.login-form-wrap { display: grid; place-items: center; padding: 40px 24px; }
.login-form { width: min(380px, 100%); }
.login-form h2 { font-size: 26px; font-weight: 800; }
.login-form .lead { color: var(--ink3); margin: 6px 0 26px; }
.seg { display: flex; padding: 4px; background: #efece2; border-radius: 14px; margin-bottom: 20px; position: relative; }
.seg button { flex: 1; height: 38px; border: 0; border-radius: 11px; background: transparent; font-weight: 700; color: var(--ink2); transition: .25s var(--ease); display: inline-flex; gap: 6px; align-items: center; justify-content: center; }
.seg button.on { background: #fff; color: var(--ink); box-shadow: var(--sh1); }
.err-box { background: var(--rose0); color: #b4303a; border-radius: 12px; padding: 10px 14px; font-weight: 600; margin-bottom: 16px; animation: shake .4s; }
.demo-acc { margin-top: 18px; padding: 14px; border-radius: 16px; background: #fff; border: 1px dashed #d8d3c3; font-size: 12.5px; color: var(--ink2); }
.demo-acc button { border: 0; background: var(--g0); color: var(--g2); border-radius: 8px; padding: 3px 9px; font-weight: 700; font-size: 12px; margin-left: 6px; }

/* ---------- 学生端框架 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50; height: 66px; display: flex; align-items: center; gap: 20px; padding: 0 max(20px, calc((calc(100vw / var(--zoom)) - 1320px) / 2));
  background: rgba(255, 253, 248, .78); backdrop-filter: saturate(1.6) blur(16px); border-bottom: 1px solid rgba(233, 229, 216, .7);
}
.brand-sm { display: flex; align-items: center; gap: 9px; font-weight: 800; font-size: 17px; letter-spacing: .05em; }
.brand-sm svg { width: 32px; height: 32px; }
.brand-sm small { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink3); letter-spacing: .02em; margin-top: -2px; }
.nav { display: flex; gap: 4px; margin-left: 10px; }
.nav a { height: 38px; padding: 0 14px; border-radius: 12px; display: inline-flex; align-items: center; gap: 7px; font-weight: 600; color: var(--ink2); transition: .2s; position: relative; }
.nav a:hover { background: rgba(28, 42, 33, .05); color: var(--ink); }
.nav a.on { background: var(--ink); color: #fff; }
.nav a.on .ic { color: #9be3b4; }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.sun-pill {
  display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px 0 8px; border-radius: 999px;
  background: linear-gradient(180deg, #fff8e3, #ffefc4); border: 1px solid #ffe2a1; font-weight: 800; color: #8a5800;
}
.sun-pill svg { width: 24px; height: 24px; animation: spin 14s linear infinite; }
.icon-btn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: #fff; display: grid; place-items: center; position: relative; color: var(--ink2); transition: .2s; }
.icon-btn:hover { color: var(--ink); box-shadow: var(--sh1); }
.badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--rose); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; border: 2px solid #fff; }
.me-btn { display: flex; align-items: center; gap: 9px; padding: 4px 10px 4px 4px; border-radius: 14px; border: 1px solid var(--line); background: #fff; }
.me-btn .avatar { width: 30px; height: 30px; border-radius: 10px; font-size: 11px; }
.me-btn b { font-size: 13px; display: block; line-height: 1.2; }
.me-btn small { font-size: 11px; color: var(--ink3); display: block; line-height: 1.2; }
.page { max-width: 1320px; margin: 0 auto; padding: 22px 20px 70px; }
.page-h { display: flex; align-items: flex-end; gap: 16px; margin: 6px 0 20px; flex-wrap: wrap; }
.page-h h1 { font-size: 26px; font-weight: 800; letter-spacing: .02em; }
.page-h .sub { margin-top: 4px; }
.tabbar { display: none; }

/* ---------- 花园场景（world.js 驱动） ---------- */
.scene { position: relative; border-radius: 30px; overflow: hidden; isolation: isolate; background: #cfe9f7;
  box-shadow: 0 34px 70px -28px rgba(24, 58, 38, .45), 0 2px 6px rgba(24, 58, 38, .08), inset 0 0 0 1px rgba(255,255,255,.55); }
.world {
  position: relative; width: 100%; aspect-ratio: 2.15 / 1; overflow: hidden; isolation: isolate; border-radius: inherit;
  --top: 47%; --x0: 12%; --w0: 56%; --x1: 1%; --w1: 78%; --row1: 66%; --row2: 83%;
  --s1: #5fb2ee; --s2: #9dd4fa; --s3: #dcf1ff; --s4: #f2faf0;
  --far1: #9dbfd5; --far2: #c1d8e8; --snow: transparent;
  --hill2: #a3cd8d; --hill1: #88c070; --bush: #74b25d; --t1: #f0b73a; --t2: #df7b36; --t3: #79b45a; --trunk: #8a6243; --hl: rgba(255,255,255,.2);
  --bld: #f5ecdd; --roof: #c9573f; --win: #8db7d3; --door: #8a6243;
  --g1: #94cd77; --g2: #6fb35a; --lawnA: #93d37e; --lawnB: #85c970; --edge1: #d3a673; --edge2: #94653b;
  --haze: rgba(225, 242, 255, .38); --tint: rgba(0, 0, 0, 0); --glow: rgba(255, 238, 170, .55); --cloud-op: 1;
}
.world.season-spring { --t1: #f7bdd1; --t2: #f1a0bb; --t3: #7cc461; }
.world.season-summer { --t1: #4f9e4a; --t2: #3c8a43; --t3: #6cb85a; }
.world.season-winter { --t1: #c3cfd1; --t2: #a6b8bb; --t3: #86a296; --hill2: #dfe8e6; --hill1: #c9d9cf; --bush: #9fbea8; --snow: #fff; --g1: #b9d3b2; --g2: #9cc290; --lawnA: #acd19a; --lawnB: #a0c88e; }
.world.tod-dawn { --s1: #f0a68a; --s2: #ffcda6; --s3: #ffe8cf; --s4: #fff3e3; --far1: #c3a8bc; --far2: #dcc5d0; --tint: rgba(255, 170, 120, .18); --glow: rgba(255, 196, 150, .6); }
.world.tod-dusk { --s1: #e6876d; --s2: #ffb383; --s3: #ffdab2; --s4: #fff0dc; --far1: #b490a9; --far2: #d4b1bf; --tint: rgba(255, 140, 70, .22); --glow: rgba(255, 168, 108, .75); --bld: #f6dcc4; }
.world.tod-evening { --s1: #26376e; --s2: #575d9e; --s3: #b48da6; --s4: #e5c2b6; --far1: #4d5385; --far2: #6c6c9d; --tint: rgba(48, 54, 124, .4); --glow: rgba(255, 228, 190, .2); --win: #ffd877; --cloud-op: .5; }
.world.tod-night { --s1: #0a1431; --s2: #162350; --s3: #29386a; --s4: #3b4977; --far1: #1d2849; --far2: #28345e; --tint: rgba(14, 24, 70, .56); --glow: rgba(205, 220, 255, .2); --win: #ffd877; --cloud-op: .2; }

.world > * { position: absolute; }
.px { transform: translate3d(calc(var(--mx, 0) * var(--d) * -40px), calc(var(--my, 0) * var(--d) * -14px), 0); transition: transform 1s cubic-bezier(.2, .8, .2, 1); }
.w-sky { inset: 0; background: linear-gradient(180deg, var(--s1) 0%, var(--s2) 22%, var(--s3) 38%, var(--s4) 50%); }
.w-stars { inset: 0 0 50% 0; opacity: 0; transition: opacity 3s; }
.tod-evening .w-stars { opacity: .5; } .tod-night .w-stars { opacity: 1; }
.w-stars i { position: absolute; width: calc(2px * var(--z)); height: calc(2px * var(--z)); border-radius: 50%; background: #fff; box-shadow: 0 0 6px rgba(255,255,255,.9); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.w-sunglow { inset: 0; background: radial-gradient(circle at var(--sx, 70%) var(--sy, 20%), var(--glow), transparent 34%); mix-blend-mode: screen; z-index: 1; pointer-events: none; }
.w-celestial { width: 6.6%; aspect-ratio: 1; z-index: 1; left: 70%; top: 20%; transform: translate(-50%, -50%) translate3d(calc(var(--mx, 0) * -3px), calc(var(--my, 0) * -1px), 0); transition: left 2s linear, top 2s linear, transform 1s; }
.w-celestial .orb { position: absolute; inset: 0; border-radius: 50%; background: radial-gradient(circle at 40% 38%, #fffbe6, #ffe68f 36%, #ffc53c 72%);
  box-shadow: 0 0 40px 12px rgba(255, 214, 102, .6), 0 0 140px 60px rgba(255, 226, 150, .32); }
.w-celestial .orb::before { content: ""; position: absolute; inset: -70%; border-radius: 50%; background: repeating-conic-gradient(rgba(255, 228, 140, .22) 0 8deg, transparent 8deg 22deg);
  -webkit-mask: radial-gradient(circle, #000 25%, transparent 68%); mask: radial-gradient(circle, #000 25%, transparent 68%); animation: spin 60s linear infinite; }
.tod-dawn .w-celestial .orb, .tod-dusk .w-celestial .orb { background: radial-gradient(circle at 42% 40%, #fff3d6, #ffb46c 52%, #ff874a); box-shadow: 0 0 50px 18px rgba(255, 150, 90, .55), 0 0 160px 70px rgba(255, 170, 110, .3); }
.w-celestial.moon { width: 4.4%; }
.w-celestial.moon .orb { background: radial-gradient(circle at 36% 34%, #fffef6, #ecead6 58%, #d3cfb4); box-shadow: 0 0 26px 6px rgba(240, 240, 214, .4), 0 0 110px 46px rgba(170, 186, 255, .16); }
.w-celestial.moon .orb::before { inset: 0; animation: none; -webkit-mask: none; mask: none; background: radial-gradient(circle at 62% 40%, rgba(160, 156, 128, .35) 0 9%, transparent 10%), radial-gradient(circle at 40% 64%, rgba(160, 156, 128, .3) 0 12%, transparent 13%), radial-gradient(circle at 70% 70%, rgba(160, 156, 128, .25) 0 6%, transparent 7%); }
.w-clouds { inset: 0 0 52% 0; z-index: 2; pointer-events: none; }
.cloud { position: absolute; top: var(--top); left: -20%; width: var(--cw); aspect-ratio: 220 / 90; opacity: calc(var(--o) * var(--cloud-op)); animation: drift var(--dur) linear var(--delay) infinite; filter: drop-shadow(0 8px 12px rgba(70, 100, 140, .14)); }
@keyframes drift { from { left: -20%; } to { left: 106%; } }
.tod-dawn .cloud, .tod-dusk .cloud { filter: sepia(.5) saturate(2.2) hue-rotate(-28deg) drop-shadow(0 8px 12px rgba(150, 80, 60, .14)); }
.tod-evening .cloud, .tod-night .cloud { filter: brightness(.55) saturate(.6); }
.w-birds { left: -8%; top: 13%; width: 5%; aspect-ratio: 2.4; z-index: 3; display: none; animation: birds 48s linear 4s infinite; pointer-events: none; }
.tod-day .w-birds, .tod-dawn .w-birds { display: block; }
.w-birds svg { position: absolute; width: 38%; animation: flapb .5s ease-in-out infinite alternate; }
.w-birds svg:nth-child(1) { left: 0; top: 30%; } .w-birds svg:nth-child(2) { left: 34%; top: 0; animation-delay: -.2s; width: 32%; } .w-birds svg:nth-child(3) { left: 62%; top: 44%; animation-delay: -.35s; width: 28%; }
@keyframes birds { 0% { left: -8%; top: 15%; } 50% { top: 10%; } 100% { left: 108%; top: 17%; } }
@keyframes flapb { to { transform: scaleY(.45); } }
.w-far { left: -4%; width: 108%; bottom: 52%; height: 20%; z-index: 3; }
.w-far .f2 { fill: var(--far2); } .w-far .f1 { fill: var(--far1); } .w-far .snow { fill: var(--snow); }
.w-ground { left: 0; right: 0; top: 46%; bottom: 0; z-index: 4; background: radial-gradient(rgba(255,255,255,.07) 1px, transparent 1.6px) 0 0 / 13px 9px, linear-gradient(180deg, var(--hill1), var(--g1) 26%, var(--g2)); }
.w-mid { left: -3%; width: 106%; bottom: 53%; height: 30%; z-index: 5; overflow: visible; }
.w-mid .h2 { fill: var(--hill2); } .w-mid .h1 { fill: var(--hill1); } .w-mid .bushes ellipse { fill: var(--bush); }
.w-mid .trees-back { opacity: .85; }
.school .bld { fill: var(--bld); } .school .bld-roof { fill: var(--roof); } .school .bld-door { fill: var(--door); }
.school .win rect { fill: var(--win); transition: fill 2s; }
.tod-evening .school .win rect, .tod-night .school .win rect { filter: drop-shadow(0 0 3px rgba(255, 210, 110, .9)); }
.school .win rect:nth-child(3n) { fill-opacity: .82; }
.tod-night .school .win rect:nth-child(4n+1) { fill: #3a4569; filter: none; }
.school .bld-clock { fill: #fff; stroke: var(--roof); stroke-width: 2; } .school .bld-hand { stroke: #3a3a3a; stroke-width: 1.4; fill: none; stroke-linecap: round; }
.school .pole { stroke: #a6aeb8; stroke-width: 2.4; }
.school .flag { fill: #e5403a; transform-box: fill-box; transform-origin: 0 50%; animation: flag 2.6s ease-in-out infinite; }
@keyframes flag { 0%, 100% { transform: skewY(0) scaleX(1); } 50% { transform: skewY(-7deg) scaleX(.9); } }
.w-path { inset: 0; width: 100%; height: 100%; z-index: 5; }
.w-path .road { fill: url(#g-road); }
.w-path .road-hl { fill: none; stroke: rgba(255, 255, 255, .45); stroke-width: 2; stroke-dasharray: 7 12; vector-effect: non-scaling-stroke; }
.w-lawn-edge, .w-lawn { inset: 0; z-index: 6; pointer-events: none; }
.w-lawn-edge { clip-path: polygon(calc(var(--x0) - .7%) calc(var(--top) - 1.5%), calc(var(--x0) + var(--w0) + .7%) calc(var(--top) - 1.5%), calc(var(--x1) + var(--w1) + 1.3%) 100%, calc(var(--x1) - 1.3%) 100%);
  background: linear-gradient(180deg, var(--edge1), var(--edge2)); }
.w-lawn { clip-path: polygon(var(--x0) var(--top), calc(var(--x0) + var(--w0)) var(--top), calc(var(--x1) + var(--w1)) 100%, var(--x1) 100%);
  background:
    linear-gradient(180deg, var(--haze) var(--top), transparent calc(var(--top) + 18%)),
    linear-gradient(180deg, transparent var(--row1), rgba(255,255,255,.07) var(--row1) var(--row2), transparent var(--row2)),
    radial-gradient(rgba(255,255,255,.09) 1px, transparent 1.7px) 0 0 / 9px 7px,
    repeating-conic-gradient(from var(--lawn-from, 156deg) at var(--vx, 40%) var(--vy, -88%), var(--lawnA) 0deg var(--lawn-st, 8deg), var(--lawnB) var(--lawn-st, 8deg) calc(var(--lawn-st, 8deg) * 2)); }

.beds { inset: 0; z-index: 7; }
.plot {
  position: absolute; display: block; border: 0; padding: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  --t: .2; --x: calc(var(--x0) + (var(--x1) - var(--x0)) * var(--t)); --w: calc(var(--w0) + (var(--w1) - var(--w0)) * var(--t));
  left: calc(var(--x) + var(--w) * (var(--c) + .5) / 6); top: calc(var(--top) + (100% - var(--top)) * var(--t));
  width: calc(var(--w) / 6 * .84); aspect-ratio: 1; transform: translate(-50%, -80%); z-index: 20; outline: none;
}
.plot.r1 { --t: .52; z-index: 22; } .plot.r2 { --t: .84; z-index: 24; }
div.plot { cursor: default; }
.plot .soil { position: absolute; left: 3%; right: 3%; bottom: 8%; height: 24%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 28%, #8f633f, #6b442a 52%, #4a2d19 86%);
  box-shadow: inset 0 2px 2px rgba(255, 230, 200, .18), inset 0 -3px 5px rgba(0, 0, 0, .35), 0 2px 0 rgba(255, 255, 255, .16), 0 5px 10px rgba(25, 55, 18, .3);
  transition: box-shadow .3s, transform .3s var(--spring); }
.plot .soil::after { content: ""; position: absolute; inset: 20% 14%; border-radius: 50%; background: radial-gradient(circle, rgba(30, 14, 4, .3) 1px, transparent 1.6px) 0 0 / 6px 5px; }
.plot:hover .soil, .plot:focus-visible .soil { box-shadow: inset 0 2px 2px rgba(255, 230, 200, .18), inset 0 -3px 5px rgba(0, 0, 0, .35), 0 0 0 3px rgba(255, 255, 255, .7), 0 0 26px 8px rgba(255, 246, 190, .6); }
.plot .plant { position: absolute; left: 0; bottom: 15%; width: 100%; height: 100%; transform-origin: 50% 95%; filter: drop-shadow(0 7px 5px rgba(20, 48, 14, .24)); transition: translate .35s var(--spring), scale .35s var(--spring); pointer-events: none; overflow: visible; }
.plot .plant.sway { animation: sway 3.8s ease-in-out infinite; animation-delay: calc(var(--i) * -.41s); }
.plot:hover .plant { translate: 0 -6%; scale: 1.05; }
.plot.eaten .plant { left: 12%; width: 76%; height: 76%; filter: saturate(.85) drop-shadow(0 5px 4px rgba(20, 48, 14, .2)); }
.plot.grow .plant { animation: grow-plant .9s var(--spring) both, sway 3.8s ease-in-out .9s infinite; }
.plot-add { position: absolute; left: 50%; bottom: 13%; width: 32%; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; transform: translateX(-50%) scale(.6);
  background: rgba(255, 255, 255, 0); color: transparent; transition: .3s var(--spring); }
.plot-add svg { width: 58%; height: 58%; }
.plot:hover .plot-add, .plot:focus-visible .plot-add { background: rgba(255, 255, 255, .95); color: var(--g1); transform: translateX(-50%) translateY(-60%) scale(1); box-shadow: 0 8px 18px rgba(24, 58, 18, .3); }
.pips { position: absolute; left: 50%; top: 0; transform: translate(-50%, -30%); display: flex; gap: 3px; padding: 3px 6px; border-radius: 99px; background: rgba(255, 255, 255, .88);
  box-shadow: 0 3px 8px rgba(24, 58, 18, .18); opacity: 0; transition: opacity .25s, transform .25s; z-index: 3; pointer-events: none; }
.pips i { width: 6px; height: 6px; border-radius: 50%; background: #ddd7c8; }
.pips i.on { background: #ff5d6c; }
.plot:hover .pips, .plot.hurt .pips { opacity: 1; }
.ptip { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 4px); white-space: nowrap; padding: 5px 10px; border-radius: 10px; font-size: 12px; font-weight: 700;
  background: rgba(22, 34, 26, .86); color: #fff; opacity: 0; transition: .2s; pointer-events: none; z-index: 5; backdrop-filter: blur(6px); }
.ptip small { color: #b9e7c6; font-weight: 600; margin-left: 5px; }
.plot:hover .ptip { opacity: 1; transform: translate(-50%, -4px); }
.plot.hit .plant { animation: shake .5s; }
.plot.hit .soil { box-shadow: 0 0 0 3px rgba(236, 91, 100, .7), 0 0 30px 8px rgba(236, 91, 100, .45); }
.crumb { position: absolute; width: 6px; height: 6px; border-radius: 2px; background: #7cc36a; z-index: 40; pointer-events: none; transition: transform .7s var(--ease), opacity .7s; }
.spark { position: absolute; left: 50%; top: 10%; width: 22%; aspect-ratio: 1; pointer-events: none; z-index: 4; animation: spark 2.4s var(--ease) forwards; filter: drop-shadow(0 0 6px rgba(255, 210, 80, .9)); }
.spark svg { width: 100%; height: 100%; }
@keyframes spark { 0% { opacity: 0; transform: translate(-50%, 0) scale(.3); } 18% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -260%) scale(1) rotate(120deg); } }

.lane { inset: 0; z-index: 8; pointer-events: none; }
.monster { position: absolute; width: calc(9.6% * var(--s, 1)); aspect-ratio: 120 / 112; transform: translate(-50%, -94%); pointer-events: auto; z-index: 21;
  transition: left 2s var(--ease), top 2s var(--ease), width 2s var(--ease); outline: none; }
.monster .m-art, .monster .m-art svg { display: block; width: 100%; height: 100%; overflow: visible; }
.monster .m-art svg { transform-origin: 50% 95%; animation: breathe 3.4s ease-in-out infinite; filter: drop-shadow(0 10px 8px rgba(44, 28, 110, .28)); }
.monster:hover .m-art svg { animation: wiggle .5s ease-in-out infinite; }
.monster.near .m-art svg { animation: walk .9s ease-in-out infinite; }
.monster.inside .m-art svg { animation: walk .5s ease-in-out infinite; }
.monster .m-z { animation: zz 2.8s ease-in-out infinite; }
.monster .m-z + .m-z { animation-delay: -1.4s; }
.monster.near .m-z, .monster.inside .m-z { display: none; }
.monster .m-glow { animation: phone 2.4s ease-in-out infinite; }
.monster.inside .m-mouth, .walker.chomp .m-mouth { transform-box: fill-box; transform-origin: center; animation: chomp .3s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { transform: scale(1, 1); } 50% { transform: scale(1.03, .97); } }
@keyframes zz { 0% { opacity: 0; transform: translate(0, 4px); } 30% { opacity: 1; } 100% { opacity: 0; transform: translate(6px, -10px); } }
@keyframes phone { 0%, 100% { opacity: .1; } 50% { opacity: .7; } }
.m-tag { position: absolute; left: 50%; bottom: 100%; transform: translate(-50%, 2px); white-space: nowrap; font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 99px;
  background: rgba(36, 26, 82, .8); color: #fff; backdrop-filter: blur(6px); box-shadow: 0 6px 14px rgba(30, 20, 80, .25); pointer-events: none; line-height: 1.5; }
.m-tag em { display: none; font-style: normal; color: #d8d1ff; margin-right: 6px; max-width: 220px; overflow: hidden; text-overflow: ellipsis; vertical-align: bottom; }
.monster.tag-left .m-tag { left: auto; right: 72%; bottom: 46%; transform: none; }
.monster:hover, .monster:focus-visible { z-index: 45 !important; }
.monster:hover .m-tag em, .monster:focus-visible .m-tag em { display: inline-block; }
.m-tag b { color: #ffd36e; }
.monster.near .m-tag { background: rgba(214, 64, 86, .92); } .monster.near .m-tag b { color: #fff; }
.monster.inside .m-tag { background: var(--rose); } .monster.inside .m-tag b { color: #fff; }
.walker { position: absolute; z-index: 30; aspect-ratio: 120 / 112; transform: translate(-50%, -94%); pointer-events: none; }
.walker svg { width: 100%; height: 100%; overflow: visible; animation: walk .5s ease-in-out infinite; filter: drop-shadow(0 10px 8px rgba(44, 28, 110, .3)); }

.w-fx { inset: 0; z-index: 30; pointer-events: none; overflow: hidden; }
.fall { position: absolute; top: -6%; animation: fall linear forwards; }
.fall svg { width: 100%; height: 100%; animation: flutter ease-in-out infinite alternate; }
@keyframes fall { 0% { transform: translate(0, 0) rotate(0); opacity: 0; } 8%, 88% { opacity: 1; } 100% { transform: translate(var(--dx), calc(var(--wh, 560px) + 40px)) rotate(var(--rot)); opacity: 0; } }
@keyframes flutter { from { transform: rotateY(0) translateX(-8px); } to { transform: rotateY(70deg) translateX(8px); } }
.fall.flake { filter: drop-shadow(0 0 2px rgba(255,255,255,.8)); }
.bfly { position: absolute; width: 2.3%; aspect-ratio: 40 / 30; will-change: left, top; }
.bfly svg { width: 100%; height: 100%; }
.bfly .wing-l, .bfly .wing-r { transform-box: fill-box; animation: flap .2s ease-in-out infinite alternate; }
.bfly .wing-l { transform-origin: right center; } .bfly .wing-r { transform-origin: left center; }
@keyframes flap { to { transform: scaleX(.22); } }
.ffly { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: #fff9b0;
  box-shadow: 0 0 8px 3px rgba(255, 240, 120, .8), 0 0 22px 8px rgba(255, 240, 120, .25); animation: wander 9s ease-in-out infinite alternate, blinkf 2.4s ease-in-out infinite; }
@keyframes wander { 0% { transform: translate(0, 0); } 33% { transform: translate(34px, -20px); } 66% { transform: translate(-22px, -34px); } 100% { transform: translate(16px, 12px); } }
@keyframes blinkf { 0%, 100% { opacity: .1; } 50% { opacity: 1; } }
.w-fg { left: 0; bottom: -1px; width: 100%; height: 11%; z-index: 28; pointer-events: none; }
.w-fg .b1 { fill: #5aa447; } .w-fg .b2 { fill: #78c05e; } .w-fg .flowers circle { fill: #fff2a6; }
.w-fg .blades { transform-box: fill-box; transform-origin: 50% 100%; animation: grass 4.2s ease-in-out infinite; }
.w-fg .b2 { animation-delay: -1.6s; }
@keyframes grass { 50% { transform: skewX(-5deg); } }
.w-tint { inset: 0; z-index: 29; pointer-events: none; background: linear-gradient(180deg, transparent 32%, var(--tint) 50%); mix-blend-mode: multiply; transition: background 2s; }

/* 场景上的浮层 */
.scene-ui { position: absolute; inset: 0; z-index: 50; pointer-events: none; padding: 20px 22px; display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.scene-ui > * { pointer-events: auto; }
.glass { background: rgba(255, 255, 255, .74); backdrop-filter: blur(16px) saturate(1.5); -webkit-backdrop-filter: blur(16px) saturate(1.5); border: 1px solid rgba(255, 255, 255, .85); box-shadow: 0 10px 30px rgba(20, 50, 70, .14); }
.greet { display: flex; align-items: center; gap: 12px; padding: 10px 18px 10px 10px; border-radius: 22px; max-width: 520px; }
.greet .xh { width: 52px; height: 52px; flex: none; animation: bob 3s ease-in-out infinite; }
.greet-hi { font-weight: 800; font-size: 17px; }
.greet-tip { color: var(--ink2); font-size: 13.5px; min-height: 22px; }
.clock { text-align: right; padding: 10px 16px 11px; border-radius: 20px; min-width: 168px; }
.clock .ct { font-size: 30px; font-weight: 800; letter-spacing: .03em; line-height: 1.05; font-variant-numeric: tabular-nums; }
.clock .cd { font-size: 12px; color: var(--ink2); margin-top: 3px; }
.clock .cs { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 11.5px; font-weight: 700; color: #7a5a16; background: #fff1cc; padding: 2px 9px; border-radius: 99px; }
.scene-side { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.threat { display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 8px; border-radius: 18px; max-width: 260px; }
.threat .ti { width: 34px; height: 34px; border-radius: 12px; background: var(--grape0); display: grid; place-items: center; flex: none; }
.threat .ti svg { width: 30px; height: 28px; }
.threat b { font-size: 13px; display: block; line-height: 1.3; }
.threat small { font-size: 11.5px; color: var(--ink2); display: block; line-height: 1.35; }
.threat.hot .ti { background: var(--rose0); animation: pulse-ring 1.8s infinite; }
.threat.safe .ti { background: var(--g0); color: var(--g1); }
.replay-banner {
  position: absolute; z-index: 60; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(420px, 90%); text-align: center;
  padding: 26px 22px 20px; border-radius: 26px; background: rgba(32, 22, 78, .84); color: #fff; backdrop-filter: blur(12px);
  box-shadow: 0 30px 60px rgba(30, 20, 80, .4); animation: modal-in2 .5s var(--spring) both;
}
@keyframes modal-in2 { from { opacity: 0; transform: translate(-50%, -44%) scale(.92); } }
.replay-banner svg { width: 86px; height: 80px; margin: -64px auto 6px; animation: walk 1s ease-in-out infinite; overflow: visible; }
.replay-banner h3 { font-size: 19px; }
.replay-banner p { color: #d8d1ff; font-size: 13.5px; margin: 6px 0 16px; }
.scene.replaying .scene-ui { opacity: .35; transition: opacity .4s; }

/* ---------- 花园页内容 ---------- */
.home-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 20px; margin-top: 22px; }
.hw-card {
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px;
  border: 1px solid var(--line2); background: linear-gradient(180deg, #fff, #fffdf8); transition: .25s var(--ease);
}
.hw-card + .hw-card { margin-top: 10px; }
.hw-card:hover { transform: translateY(-2px); box-shadow: var(--sh1); border-color: var(--line); }
.hw-ico { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: var(--grape0); position: relative; }
.hw-ico svg { width: 40px; height: 38px; }
.hw-ico.done { background: var(--g0); color: var(--g1); }
.hw-ico.done svg { width: 26px; height: 26px; }
.hw-ico.wait { background: var(--sun0); color: var(--sun2); }
.hw-ico.wait svg { width: 24px; height: 24px; }
.hw-ico.back { background: var(--rose0); color: var(--rose); }
.hw-ico.back svg { width: 24px; height: 24px; }
.hw-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hw-meta { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 5px; }
.count-due { font-variant-numeric: tabular-nums; }
.timeline { position: relative; }
.timeline .tl { display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 7px 0; position: relative; }
.timeline .tl::before { content: ""; position: absolute; left: 14px; top: 34px; bottom: -8px; width: 2px; background: var(--line2); }
.timeline .tl:last-child::before { display: none; }
.tl-dot { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--line2); color: var(--ink2); }
.tl-dot svg { width: 16px; height: 16px; }
.tl-dot.attack { background: var(--grape0); color: var(--grape); }
.tl-dot.defend { background: var(--g0); color: var(--g1); }
.tl-dot.reward { background: var(--sun0); color: var(--sun2); }
.tl-dot.plant, .tl-dot.revive, .tl-dot.water { background: var(--teal0); color: var(--teal); }
.tl-dot.redeem { background: var(--rose0); color: var(--rose); }
.tl b { font-weight: 600; font-size: 13.5px; display: block; }
.tl small { color: var(--ink3); font-size: 12px; }
.team-hero { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, var(--tc, #4caf50) -40%, #fff 70%); border: 1px solid var(--line2); }
.team-hero svg { width: 64px; height: 64px; flex: none; animation: sway 3s ease-in-out infinite; transform-origin: 50% 100%; }
.team-hero b { font-size: 17px; display: block; }
.rank-badge { margin-left: auto; text-align: center; background: #fff; border-radius: 14px; padding: 6px 12px; box-shadow: var(--sh1); }
.rank-badge b { font-size: 22px; line-height: 1.1; }
.rank-badge small { display: block; font-size: 11px; color: var(--ink3); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.mini-stats div { background: var(--g00); border-radius: 14px; padding: 10px 12px; }
.mini-stats b { font-size: 19px; display: block; line-height: 1.2; }
.mini-stats span { font-size: 11.5px; color: var(--ink3); }
.stat-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.stat { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff, #fffdf8); border: 1px solid var(--line2); border-radius: 22px; padding: 16px 18px;
  box-shadow: var(--sh1); display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: center; min-height: 102px; transition: transform .3s var(--ease), box-shadow .3s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--sh2); }
.stat::after { content: ""; position: absolute; right: -40px; top: -40px; width: 120px; height: 120px; border-radius: 50%; opacity: .5; pointer-events: none; }
.stat.sun::after { background: radial-gradient(circle, rgba(255, 205, 80, .28), transparent 70%); }
.stat.fire::after { background: radial-gradient(circle, rgba(255, 122, 69, .2), transparent 70%); }
.stat.life::after { background: radial-gradient(circle, rgba(47, 158, 98, .18), transparent 70%); }
.stat.focus::after { background: radial-gradient(circle, rgba(61, 139, 253, .16), transparent 70%); }
.stat .s-ic { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; }
.stat .s-ic svg { width: 24px; height: 24px; }
.stat.sun .s-ic { background: linear-gradient(135deg, #fff6d8, #ffe4a0); } .stat.sun .s-ic svg { width: 32px; height: 32px; animation: spin 20s linear infinite; }
.stat.fire .s-ic { background: linear-gradient(135deg, #fff0e8, #ffd9c6); color: #ff6a33; } .stat.fire .s-ic svg { animation: flicker 1.4s ease-in-out infinite; transform-origin: 50% 90%; }
.stat.focus .s-ic { background: linear-gradient(135deg, #eef5ff, #dce9ff); color: var(--sky); }
.stat .s-l { font-size: 12.5px; color: var(--ink3); font-weight: 600; }
.stat .s-v { font-size: 27px; font-weight: 800; line-height: 1.15; letter-spacing: .01em; }
.stat .s-v small { font-size: 13px; color: var(--ink3); font-weight: 600; margin-left: 3px; }
.stat .s-f { font-size: 12px; color: var(--ink3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes flicker { 0%, 100% { transform: scale(1) rotate(-3deg); } 50% { transform: scale(1.08, 1.14) rotate(3deg); } }
@keyframes grow-y { from { transform: scaleY(0); } }
.spark-bars { display: flex; align-items: flex-end; gap: 4px; height: 46px; }
.spark-bars i { width: 7px; border-radius: 4px; background: linear-gradient(180deg, #ffd25e, #f5a91b); transform-origin: bottom; animation: grow-y .9s var(--ease) both; }
.spark-bars i.today { background: linear-gradient(180deg, #6fd08e, #2f9e62); }
.dots7 { display: grid; grid-template-columns: repeat(4, 12px); gap: 5px; }
.dots7 i { width: 12px; height: 12px; border-radius: 4px; background: var(--line); animation: pop-in .4s var(--spring) both; }
.dots7 i:nth-child(2) { animation-delay: .05s; } .dots7 i:nth-child(3) { animation-delay: .1s; } .dots7 i:nth-child(4) { animation-delay: .15s; } .dots7 i:nth-child(5) { animation-delay: .2s; } .dots7 i:nth-child(6) { animation-delay: .25s; } .dots7 i:nth-child(7) { animation-delay: .3s; }
.dots7 i.ontime { background: #3fb36f; } .dots7 i.late { background: #f5b324; } .dots7 i.miss { background: #a596f5; }
.dots7.lg { display: flex; } .dots7.lg i { width: 16px; height: 16px; border-radius: 5px; }
.ring-sm { width: 58px; height: 58px; position: relative; flex: none; }
.ring-sm svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring-sm circle { fill: none; stroke-width: 6; }
.ring-sm .bg { stroke: var(--g0); }
.ring-sm .fg { stroke: url(#ring-life); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); animation: ring-in 1.4s var(--ease) both; }
@keyframes ring-in { from { stroke-dashoffset: 157.1; } }
.ring-sm b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13px; font-weight: 800; }
.mini-ring { text-align: center; padding: 6px 10px; border-radius: 14px; background: var(--sky0); color: #2569d6; }
.mini-ring b { display: block; font-size: 18px; line-height: 1.2; } .mini-ring small { font-size: 11px; color: #5a83c4; }

.home-grid3 { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.segs { display: flex; gap: 4px; margin-top: 9px; max-width: 260px; }
.segs i { flex: 1; height: 5px; border-radius: 4px; background: var(--line2); }
.segs i.on { background: linear-gradient(90deg, #5fc27e, #2f9e62); }
.week-chart { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; align-items: end; height: 160px; padding: 24px 4px 0; border-bottom: 1px dashed var(--line); }
.wc { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 7px; height: 100%; }
.wc .bar-v { width: 100%; max-width: 36px; border-radius: 11px 11px 6px 6px; background: linear-gradient(180deg, #ffd56a, #f5a91b); position: relative; transform-origin: bottom;
  animation: grow-y 1s var(--ease) both; animation-delay: calc(var(--k) * 70ms); box-shadow: inset 0 2px 0 rgba(255,255,255,.4); }
.wc .bar-v.today { background: linear-gradient(180deg, #74d593, #2f9e62); }
.wc .bar-v b { position: absolute; top: -21px; left: 50%; transform: translateX(-50%); font-size: 12px; color: var(--ink2); }
.wc .bite { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 22px; height: 21px; }
.wc small { font-size: 12px; color: var(--ink3); font-weight: 600; padding-bottom: 6px; }
.wc small.today { color: var(--g1); }
.week-foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; font-size: 12.5px; color: var(--ink3); }
.week-foot .legend { margin: 0 0 0 auto; }
.presence { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border-radius: 18px; background: linear-gradient(135deg, #ecf8f1, #f3f8ff); border: 1px solid #e0efe6; }
.presence.idle { background: linear-gradient(135deg, #f6f4ee, #f3f5f9); border-color: var(--line2); }
.presence .live { width: 10px; height: 10px; border-radius: 50%; background: #2fbf6a; animation: live 1.8s infinite; }
.presence .live.off { background: #c9c3b3; animation: none; }
@keyframes live { 0% { box-shadow: 0 0 0 0 rgba(47, 191, 106, .5); } 70% { box-shadow: 0 0 0 10px rgba(47, 191, 106, 0); } 100% { box-shadow: 0 0 0 0 rgba(47, 191, 106, 0); } }
.p-txt b { display: block; font-size: 14px; } .p-txt small { display: block; font-size: 12px; color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avs { display: flex; }
.avs .avatar { width: 30px; height: 30px; border-radius: 50%; font-size: 10.5px; border: 2px solid #fff; margin-left: -9px; box-shadow: 0 2px 6px rgba(0,0,0,.08); }
.avs .avatar:first-child { margin-left: 0; }
.pulse { margin-top: 10px; max-height: 470px; overflow: hidden; -webkit-mask: linear-gradient(180deg, #000 82%, transparent); mask: linear-gradient(180deg, #000 82%, transparent); }
.pulse .pi { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 11px; align-items: start; padding: 9px 6px; border-radius: 12px; animation: fade-up .5s var(--ease) both; }
.pulse .pi + .pi { border-top: 1px dashed var(--line2); }
.pulse .pi.new { background: linear-gradient(90deg, rgba(47, 158, 98, .1), transparent); }
.pulse .pi.me b { color: var(--g2); }
.pi-ic { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.pi-ic svg { width: 16px; height: 16px; }
.pi-ic.g { background: var(--g0); color: var(--g1); } .pi-ic.sun { background: var(--sun0); color: var(--sun2); } .pi-ic.teal { background: var(--teal0); color: var(--teal); } .pi-ic.sky { background: var(--sky0); color: var(--sky); }
.pulse .pi b { font-weight: 600; font-size: 13px; display: block; line-height: 1.5; }
.pulse .pi small { color: var(--ink3); font-size: 11.5px; }
.rules-band { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.rule { display: flex; gap: 12px; align-items: flex-start; padding: 16px; border-radius: 20px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line2); font-size: 12.5px; color: var(--ink2); line-height: 1.65; }
.rule b { display: block; font-size: 13.5px; color: var(--ink); margin-bottom: 2px; }
.r-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.r-ic svg { width: 19px; height: 19px; } .r-ic svg[viewBox] { width: 30px; height: 28px; }
.r-ic.g { background: var(--sun0); } .r-ic.grape { background: var(--grape0); } .r-ic.leaf { background: var(--g0); color: var(--g1); } .r-ic.teal { background: var(--teal0); color: var(--teal); }

/* ---------- 植物选择 / 详情 ---------- */
.plant-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pick {
  border: 1.5px solid var(--line); background: #fff; border-radius: 18px; padding: 10px 8px 10px; text-align: center; transition: .2s var(--ease); position: relative;
}
.pick:hover { border-color: #9fd7b3; transform: translateY(-2px); box-shadow: var(--sh1); }
.pick.sel { border-color: var(--g1); box-shadow: 0 0 0 4px rgba(47, 158, 98, .14); }
.pick[disabled] { opacity: .45; pointer-events: none; }
.pick svg.art { width: 64px; height: 64px; margin: 0 auto; }
.pick b { display: block; font-size: 13.5px; margin-top: 2px; }
.pick .cost { display: inline-flex; align-items: center; gap: 3px; font-weight: 800; color: #9a6500; font-size: 13px; }
.pick .cost svg { width: 15px; height: 15px; }
.pick-desc { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: var(--g00); font-size: 13px; color: var(--ink2); min-height: 46px; }
.plant-detail { display: flex; gap: 18px; align-items: center; }
.plant-detail .art-box { width: 120px; height: 120px; border-radius: 26px; display: grid; place-items: center; background: radial-gradient(circle at 50% 70%, #d6f0cc, #eef8ea 70%); flex: none; }
.plant-detail .art-box svg { width: 100px; height: 100px; animation: sway 3s ease-in-out infinite; transform-origin: 50% 96%; }
.hearts { display: flex; gap: 4px; margin: 8px 0; color: var(--rose); }
.hearts svg { width: 18px; height: 18px; }
.hearts svg.off { color: #e2ddd0; }

/* ---------- 作业专注页 ---------- */
.focus-head { display: flex; gap: 18px; align-items: center; padding: 20px 22px; border-radius: 24px; background: linear-gradient(120deg, #fff 30%, #f2fbf5); border: 1px solid var(--line2); box-shadow: var(--sh1); flex-wrap: wrap; }
.focus-head h1 { font-size: 22px; font-weight: 800; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--ink3); font-size: 13px; margin-bottom: 8px; }
.back-link:hover { color: var(--g1); }
.focus-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 20px; margin-top: 20px; }
.steps { display: flex; flex-direction: column; gap: 10px; }
.step {
  display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 13px 14px; border-radius: 18px; background: #fff;
  border: 1.5px solid var(--line2); transition: .25s var(--ease); cursor: pointer; text-align: left; width: 100%;
}
.step:hover { border-color: var(--line); }
.step.cur { border-color: var(--g1); box-shadow: 0 0 0 4px rgba(47, 158, 98, .1); }
.step .n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; background: var(--line2); color: var(--ink2); }
.step.cur .n { background: var(--g1); color: #fff; }
.step.run .n { background: var(--sun); color: #fff; animation: pulse-ring 1.6s infinite; box-shadow: 0 0 0 0 rgba(245, 179, 36, .5); }
.step.done .n { background: var(--g0); color: var(--g1); }
.step.done.slow .n { background: var(--grape0); color: var(--grape); }
.step .t { font-weight: 700; font-size: 14px; }
.step .tip { font-size: 12px; color: var(--ink3); margin-top: 2px; }
.stage {
  border-radius: 26px; overflow: hidden; position: relative; padding: 22px; color: var(--ink);
  background: linear-gradient(180deg, #c6e9ff 0%, #e8f7ff 45%, #f3faea 62%); border: 1px solid rgba(255,255,255,.8); box-shadow: var(--sh2);
  transition: background 1s;
}
.stage.warn { background: linear-gradient(180deg, #ffd9b3 0%, #ffeedd 45%, #f6f3e2 62%); }
.stage.danger { background: linear-gradient(180deg, #d9c6ff 0%, #efe6ff 45%, #f1ecf3 62%); }
.stage-top { display: flex; align-items: flex-start; gap: 12px; position: relative; z-index: 2; }
.stage-task b { font-size: 18px; display: block; }
.stage-task span { font-size: 13px; color: var(--ink2); }
.timer-wrap { display: flex; align-items: center; justify-content: center; gap: 30px; margin: 18px 0 10px; position: relative; z-index: 2; flex-wrap: wrap; }
.ring { width: 190px; height: 190px; position: relative; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring .bg { stroke: rgba(255,255,255,.75); }
.ring .fg { stroke: url(#ring-g); transition: stroke-dashoffset .9s linear; }
.ring-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-center b { font-size: 40px; font-weight: 800; letter-spacing: .02em; line-height: 1.05; }
.ring-center small { color: var(--ink2); font-size: 12.5px; }
.focus-state { text-align: center; max-width: 260px; }
.focus-state .big { font-size: 17px; font-weight: 800; }
.focus-state .state-msg { color: var(--ink2); font-size: 13.5px; margin-top: 4px; }
.track { position: relative; height: 128px; margin: 6px -22px -22px; background: linear-gradient(180deg, #92d47f, #6dbd5f); border-top: 4px solid #a9df97; }
.track::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 40px, transparent 40px 80px); }
.guards { position: absolute; left: 16px; bottom: 10px; display: flex; gap: 2px; z-index: 2; }
.guards svg { width: 74px; height: 74px; transform-origin: 50% 96%; animation: sway 3s ease-in-out infinite; }
.guards svg:nth-child(2) { animation-delay: -.8s; } .guards svg:nth-child(3) { animation-delay: -1.6s; }
.guards.hit svg:first-child { animation: shake .5s 3; }
.runner { position: absolute; bottom: 14px; width: 96px; height: 90px; z-index: 3; left: calc(100% - 110px); transition: left 1s linear; }
.runner svg { width: 100%; height: 100%; }
.runner.sleep svg { animation: bob 3s ease-in-out infinite; }
.runner.walk svg { animation: walk .8s ease-in-out infinite; }
.runner.eat .m-mouth { transform-box: fill-box; transform-origin: center; animation: chomp .3s ease-in-out infinite; }
.runner .m-z { animation: zz 2.8s ease-in-out infinite; } .runner .m-z + .m-z { animation-delay: -1.4s; }
.runner.walk .m-z { display: none; }
.runner .m-glow { animation: phone 2.4s ease-in-out infinite; }
.runner.eat svg { animation: walk .35s ease-in-out infinite; }
/* 专注舞台的天空：太阳、云、远山跟着状态变色（专注中=晴天，超时=黄昏，快被咬=夜色） */
.stage { --cloud-op: 1; --hl2: #a9d78f; --hl1: #8cc873; }
.stage.warn { --hl2: #d8c58c; --hl1: #bfc276; }
.stage.danger { --hl2: #a99bd0; --hl1: #8f8fc0; --cloud-op: .55; }
.stage-sky { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.stage-hills { position: absolute; left: 0; right: 0; bottom: 124px; width: 100%; height: 84px; }
.stage-hills .h2 { fill: var(--hl2); transition: fill 1s; } .stage-hills .h1 { fill: var(--hl1); transition: fill 1s; }
.st-sun { position: absolute; right: 7%; top: 30%; width: 58px; height: 58px; border-radius: 50%; transition: transform 1.4s var(--ease), background 1s, box-shadow 1s;
  background: radial-gradient(circle at 40% 38%, #fffbe6, #ffe68f 38%, #ffc53c 74%); box-shadow: 0 0 36px 12px rgba(255, 214, 102, .5), 0 0 120px 40px rgba(255, 226, 140, .25); }
.stage.warn .st-sun { transform: translateY(44px); background: radial-gradient(circle at 40% 38%, #fff1d6, #ffb46b 45%, #ff7f3d 80%); box-shadow: 0 0 40px 14px rgba(255, 150, 80, .5); }
.stage.danger .st-sun { transform: translateY(6px) scale(.72); background: radial-gradient(circle at 36% 34%, #fffef6, #ecead6 58%, #d3cfb4); box-shadow: 0 0 26px 6px rgba(240, 240, 214, .45); }
.track::before { content: ""; position: absolute; left: -2%; right: -2%; bottom: 6px; height: 30px; border-radius: 50%; background: linear-gradient(180deg, #c99d6c, #a57647); opacity: .5; }
.runner.flee { transition: left .9s var(--ease), opacity .9s; opacity: 0; }
.stage-actions { display: flex; gap: 10px; justify-content: center; margin-top: 4px; position: relative; z-index: 2; flex-wrap: wrap; }
.distract { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink2); background: rgba(255,255,255,.7); padding: 4px 10px; border-radius: 99px; }
.flow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flow .fs { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--ink3); padding: 5px 10px; border-radius: 99px; background: var(--line2); }
.flow .fs.done { color: var(--g2); background: var(--g0); }
.flow .fs.cur { color: #fff; background: var(--ink); }
.flow .sep { width: 14px; height: 2px; background: var(--line); border-radius: 2px; }
.drop {
  border: 2px dashed #d5d0bf; border-radius: 18px; padding: 18px; text-align: center; color: var(--ink3); background: var(--paper);
  transition: .2s; cursor: pointer; display: block;
}
.drop:hover, .drop.over { border-color: var(--g1); background: var(--g00); color: var(--g2); }
.drop svg { width: 30px; height: 30px; margin: 0 auto 6px; }
.thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.thumb { width: 92px; height: 92px; border-radius: 14px; overflow: hidden; position: relative; background: #eee; box-shadow: var(--sh1); animation: pop-in .4s var(--spring); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 7px; border: 0; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; }
.thumb button svg { width: 12px; height: 12px; }
.ai-card { border-radius: 22px; padding: 18px; background: linear-gradient(135deg, #f4f1ff, #eef8ff 60%, #f3fbf6); border: 1px solid #e3ddff; position: relative; overflow: hidden; }
.ai-card::after { content: ""; position: absolute; right: -30px; top: -30px; width: 140px; height: 140px; border-radius: 50%; background: radial-gradient(circle, rgba(122, 103, 238, .14), transparent 70%); }
.grade-big { width: 70px; height: 70px; border-radius: 22px; display: grid; place-items: center; font-size: 36px; font-weight: 900; color: #fff; flex: none; box-shadow: 0 10px 22px rgba(0,0,0,.12); }
.grade-big.A { background: linear-gradient(135deg, #48c07a, #239057); }
.grade-big.B { background: linear-gradient(135deg, #ffc64a, #f09c12); }
.grade-big.C { background: linear-gradient(135deg, #ff9a8f, #e9575f); }
.grade-sm { width: 26px; height: 26px; border-radius: 8px; font-size: 13px; display: inline-grid; place-items: center; font-weight: 900; color: #fff; }
.grade-sm.A { background: #2f9e62; } .grade-sm.B { background: #f2a516; } .grade-sm.C { background: #ec5b64; }
.issues { margin: 8px 0 0; padding: 0; list-style: none; }
.issues li { position: relative; padding-left: 18px; font-size: 13.5px; color: var(--ink2); margin-top: 4px; }
.issues li::before { content: ""; position: absolute; left: 4px; top: 9px; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); }
.dict { font-size: 17px; line-height: 2; letter-spacing: .06em; padding: 14px 16px; background: #fffdf6; border-radius: 16px; border: 1px solid #f1e8cf; font-family: "Songti SC", "STSong", "SimSun", serif; }
.dict h5 { font-family: var(--font); margin: 0 0 4px; font-size: 13px; letter-spacing: 0; color: var(--ink2); }
.dict .w { color: #fff; background: var(--rose); border-radius: 5px; padding: 0 2px; position: relative; cursor: help; }
.dict .m { color: var(--rose); text-decoration: underline wavy var(--rose); opacity: .7; }
.reward-list { display: flex; flex-direction: column; gap: 6px; }
.reward-list div { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink2); }
.reward-list div b { color: #9a6500; }
.reward-list .total { border-top: 1px dashed var(--line); padding-top: 8px; margin-top: 4px; font-weight: 800; color: var(--ink); font-size: 15px; }
.reward-list .total b { font-size: 18px; }
.thinking { display: flex; flex-direction: column; align-items: center; padding: 26px 10px; text-align: center; }
.thinking svg { width: 74px; height: 74px; animation: bob 1.2s ease-in-out infinite; }
.thinking .dots span { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--g1); margin: 0 3px; animation: bob .9s ease-in-out infinite; }
.thinking .dots span:nth-child(2) { animation-delay: .15s; } .thinking .dots span:nth-child(3) { animation-delay: .3s; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 18px; }
.banner svg.ic-lg { margin-top: 1px; }
.banner.rose { background: var(--rose0); color: #a52a33; }
.banner.sun { background: var(--sun0); color: #8a5800; }
.banner.g { background: var(--g0); color: var(--g2); }
.banner.grape { background: var(--grape0); color: var(--grape2); }
.banner b { display: block; }

/* ---------- 商店 ---------- */
.shop-hero { display: flex; align-items: center; gap: 20px; padding: 24px 26px; border-radius: 28px; background: linear-gradient(120deg, #fff3cf 0%, #fffaf0 45%, #eaf7ee 100%); border: 1px solid #f6e6b8; position: relative; overflow: hidden; }
.shop-hero .big-sun { width: 96px; height: 96px; animation: spin 30s linear infinite; flex: none; }
.shop-hero b.n { font-size: 44px; font-weight: 900; color: #8a5800; line-height: 1; }
.tabs { display: inline-flex; padding: 4px; border-radius: 14px; background: #ece9de; gap: 2px; }
.tabs button { border: 0; background: transparent; height: 36px; padding: 0 16px; border-radius: 11px; font-weight: 700; color: var(--ink2); transition: .2s; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: var(--sh1); }
.plant-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.plant-card { border-radius: 24px; background: #fff; border: 1px solid var(--line2); overflow: hidden; transition: .3s var(--ease); display: flex; flex-direction: column; }
.plant-card:hover { transform: translateY(-4px); box-shadow: var(--sh2); }
.plant-card .pc-art { height: 150px; display: grid; place-items: center; position: relative; background: radial-gradient(circle at 50% 85%, rgba(255,255,255,.9), transparent 60%), var(--pc, #e6f5ec); }
.plant-card .pc-art svg { width: 116px; height: 116px; transform-origin: 50% 96%; animation: sway 3.4s ease-in-out infinite; }
.plant-card .pc-art .chip { position: absolute; top: 12px; left: 12px; background: rgba(255,255,255,.85); }
.plant-card .pc-body { padding: 14px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.plant-card h3 { font-size: 17px; }
.plant-card .own { font-size: 12px; color: var(--ink3); }
.plant-card .pc-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; padding-top: 6px; }
.price { display: inline-flex; align-items: center; gap: 5px; font-weight: 900; font-size: 18px; color: #8a5800; }
.price svg { width: 22px; height: 22px; }
.reward-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.reward-card { border-radius: 22px; background: #fff; border: 1px solid var(--line2); padding: 18px; display: flex; flex-direction: column; gap: 8px; transition: .3s var(--ease); position: relative; overflow: hidden; }
.reward-card:hover { transform: translateY(-4px); box-shadow: var(--sh2); }
.reward-card .emo { width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center; font-size: 30px; background: linear-gradient(135deg, #fff4d8, #ffe7a6); }
.reward-card h4 { font-size: 15.5px; }
.reward-card p { font-size: 12.5px; color: var(--ink3); min-height: 38px; }
.reward-card .stock { position: absolute; top: 16px; right: 16px; }
.redeem-row { display: grid; grid-template-columns: 46px 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line2); }
.redeem-row:last-child { border: 0; }
.redeem-row .emo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; background: var(--sun0); }
.rd-steps { display: flex; gap: 4px; margin-top: 5px; }
.rd-steps i { height: 4px; width: 28px; border-radius: 4px; background: var(--line); }
.rd-steps i.on { background: var(--g1); }
.rd-steps.bad i.on { background: var(--rose); }

/* ---------- 账本 / 班级 / 对话 / 消息 ---------- */
.stat-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.tile { background: #fff; border-radius: 20px; padding: 16px 18px; border: 1px solid var(--line2); box-shadow: var(--sh1); position: relative; overflow: hidden; }
.tile .t-l { font-size: 12.5px; color: var(--ink3); display: flex; align-items: center; gap: 6px; }
.tile .t-v { font-size: 28px; font-weight: 800; line-height: 1.2; margin-top: 6px; letter-spacing: .01em; }
.tile .t-v small { font-size: 13px; color: var(--ink3); font-weight: 600; margin-left: 2px; }
.tile .t-f { font-size: 12px; color: var(--ink3); margin-top: 4px; }
.tile .t-ic { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.tile .t-ic svg { width: 20px; height: 20px; }
.ledger-day { font-size: 12px; font-weight: 700; color: var(--ink3); margin: 16px 0 6px; letter-spacing: .04em; }
.ledger-row { display: grid; grid-template-columns: 38px 1fr auto; gap: 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--line2); }
.ledger-row .k { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; }
.ledger-row .k svg { width: 18px; height: 18px; }
.ledger-row .d { font-weight: 800; font-size: 16px; }
.ledger-row .d.plus { color: #2a8a55; } .ledger-row .d.minus { color: var(--ink2); }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; gap: 14px; align-items: end; }
.pod { text-align: center; border-radius: 24px 24px 18px 18px; padding: 18px 12px 16px; background: #fff; border: 1px solid var(--line2); box-shadow: var(--sh1); position: relative; }
.pod svg.art { width: 74px; height: 74px; margin: 0 auto; transform-origin: 50% 96%; animation: sway 3s ease-in-out infinite; }
.pod .medal { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; color: #fff; box-shadow: var(--sh1); }
.pod.p1 { padding-top: 30px; background: linear-gradient(180deg, #fff6d8, #fff); border-color: #ffe6a3; }
.pod.p1 .medal { background: linear-gradient(135deg, #ffd34d, #f1a20f); width: 40px; height: 40px; top: -18px; }
.pod.p2 .medal { background: linear-gradient(135deg, #d9e1e6, #a7b4bd); }
.pod.p3 .medal { background: linear-gradient(135deg, #f2c29b, #c8814a); }
.pod b { font-size: 16px; display: block; margin-top: 4px; }
.pod .v { font-size: 22px; font-weight: 900; color: #8a5800; }
.team-row { display: grid; grid-template-columns: 30px 44px 1fr 120px 80px; gap: 12px; align-items: center; padding: 10px 6px; border-radius: 14px; }
.team-row:nth-child(odd) { background: var(--g00); }
.team-row.mine { box-shadow: inset 0 0 0 2px var(--g1); }
.team-row svg { width: 40px; height: 40px; }
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; }
.person { display: flex; gap: 9px; align-items: center; padding: 9px; border-radius: 14px; background: var(--g00); }
.person b { font-size: 13px; display: block; }
.person small { font-size: 11.5px; color: var(--ink3); }
.list-rank { display: flex; flex-direction: column; gap: 4px; }
.list-rank .lr { display: grid; grid-template-columns: 26px 32px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 8px 6px; border-radius: 12px; }
.list-rank .lr:hover { background: var(--g00); }
.list-rank .no { font-weight: 900; color: var(--ink3); text-align: center; }
.chat { display: grid; grid-template-columns: 290px minmax(0, 1fr); gap: 20px; height: calc(calc(100vh / var(--zoom)) - 150px); min-height: 520px; }
.chat-side { display: flex; flex-direction: column; gap: 14px; }
.chat-side .xh-card { text-align: center; padding: 24px 18px; border-radius: 24px; background: linear-gradient(180deg, #e9f8ec, #fff); border: 1px solid var(--line2); }
.chat-side .xh-card svg { width: 96px; height: 96px; margin: 0 auto 8px; animation: bob 3s ease-in-out infinite; }
.chat-main { display: flex; flex-direction: column; background: #fff; border-radius: 26px; border: 1px solid var(--line2); box-shadow: var(--sh1); overflow: hidden; }
.chat-log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; background: linear-gradient(180deg, #fbfdf9, #fff); }
.msg { display: flex; gap: 10px; max-width: 82%; animation: fade-up .4s var(--ease) both; }
.msg .bubble { padding: 11px 15px; border-radius: 18px; line-height: 1.75; font-size: 14.5px; white-space: pre-wrap; word-break: break-word; }
.msg.ai .bubble { background: var(--g00); border: 1px solid #e2f1e7; border-top-left-radius: 6px; }
.msg.me { margin-left: auto; flex-direction: row-reverse; }
.msg.me .bubble { background: linear-gradient(180deg, #37ab6c, #2a925a); color: #fff; border-top-right-radius: 6px; }
.msg .who { width: 36px; height: 36px; flex: none; }
.msg .meta { font-size: 11px; color: var(--ink3); margin-top: 4px; }
.caret::after { content: "▍"; animation: blink-c 1s steps(2) infinite; color: var(--g1); margin-left: 1px; }
@keyframes blink-c { 50% { opacity: 0; } }
.chat-input { display: flex; gap: 10px; padding: 14px; border-top: 1px solid var(--line2); background: #fff; align-items: flex-end; }
.chat-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 16px; padding: 11px 14px; min-height: 46px; max-height: 140px; outline: none; line-height: 1.6; }
.chat-input textarea:focus { border-color: #8fd0a9; box-shadow: 0 0 0 4px rgba(47, 158, 98, .1); }
.suggest { display: flex; flex-wrap: wrap; gap: 8px; }
.suggest button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 7px 13px; font-size: 13px; color: var(--ink2); transition: .2s; }
.suggest button:hover { border-color: var(--g1); color: var(--g2); background: var(--g00); }
.msg-item { display: grid; grid-template-columns: 42px 1fr auto; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; transition: .2s; }
.msg-item + .msg-item { margin-top: 4px; }
.msg-item:hover { background: var(--g00); }
.msg-item.unread { background: #fffaf0; }
.msg-item .k { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.msg-item .k svg { width: 20px; height: 20px; }
.msg-item b { display: block; font-size: 14.5px; }
.msg-item p { color: var(--ink2); font-size: 13.5px; margin-top: 2px; }
.unread-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose); margin-top: 6px; }

/* ---------- 老师端框架 ---------- */
.t-shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: calc(100vh / var(--zoom)); }
.side {
  position: sticky; top: 0; height: calc(100vh / var(--zoom)); padding: 22px 16px; display: flex; flex-direction: column; gap: 6px; color: #d7e6dc;
  background: radial-gradient(400px 300px at 0% 0%, rgba(124, 195, 106, .18), transparent 70%), linear-gradient(180deg, #17392b, #0f2a1f);
}
.side .brand-sm { color: #fff; padding: 4px 8px 18px; }
.side .brand-sm small { color: #8fb39d; }
.side-label { font-size: 11px; letter-spacing: .12em; color: #6f9580; padding: 14px 12px 6px; font-weight: 700; }
.side a.si { display: flex; align-items: center; gap: 11px; height: 42px; padding: 0 12px; border-radius: 12px; font-weight: 600; color: #c4d8cb; transition: .2s; position: relative; }
.side a.si:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.si.on { background: linear-gradient(90deg, rgba(124, 195, 106, .28), rgba(124, 195, 106, .08)); color: #fff; }
.side a.si.on::before { content: ""; position: absolute; left: -16px; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; background: #8de08f; }
.side a.si .cnt { margin-left: auto; min-width: 22px; height: 20px; border-radius: 99px; background: #ffc53d; color: #4a3200; font-size: 11.5px; font-weight: 800; display: grid; place-items: center; padding: 0 6px; }
.side a.si .cnt.rose { background: #ff7b84; color: #fff; }
.side-foot { margin-top: auto; padding: 14px; border-radius: 16px; background: rgba(255,255,255,.06); font-size: 12px; }
.side-foot .ai-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 0 4px rgba(94, 224, 138, .18); margin-right: 6px; }
.side-foot .ai-dot.off { background: #ff7b84; box-shadow: 0 0 0 4px rgba(255, 123, 132, .18); }
.side-foot button { margin-top: 10px; width: 100%; height: 34px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: transparent; color: #d7e6dc; display: flex; align-items: center; justify-content: center; gap: 6px; }
.side-foot button:hover { background: rgba(255,255,255,.08); }
.t-main { min-width: 0; }
.t-top { position: sticky; top: 0; z-index: 40; height: 64px; display: flex; align-items: center; gap: 12px; padding: 0 30px; background: rgba(245, 243, 234, .82); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(233, 229, 216, .7); }
#menu-btn { display: none; }
.t-crumb { font-weight: 700; color: var(--ink2); display: flex; gap: 8px; align-items: center; min-width: 0; white-space: nowrap; overflow: hidden; }
.t-crumb b { color: var(--ink); }
.t-page { padding: 24px 30px 60px; max-width: 1360px; margin: 0 auto; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi { background: #fff; border-radius: 22px; padding: 18px 20px; border: 1px solid var(--line2); box-shadow: var(--sh1); position: relative; overflow: hidden; }
.kpi .k-l { color: var(--ink3); font-size: 13px; font-weight: 600; }
.kpi .k-v { font-size: 32px; font-weight: 800; margin-top: 6px; line-height: 1.1; letter-spacing: .01em; }
.kpi .k-v small { font-size: 14px; font-weight: 700; color: var(--ink3); margin-left: 2px; }
.kpi .k-f { margin-top: 8px; font-size: 12.5px; color: var(--ink3); display: flex; align-items: center; gap: 6px; }
.kpi .k-ic { position: absolute; right: 16px; top: 16px; width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; }
.kpi .k-ic svg { width: 21px; height: 21px; }
.kpi.hero { background: linear-gradient(135deg, #1f6e47, #2f9e62 60%, #58bf7c); color: #fff; border: 0; }
.kpi.hero .k-l, .kpi.hero .k-f { color: rgba(255,255,255,.78); }
.kpi.hero .k-ic { background: rgba(255,255,255,.16); color: #fff; }
.kpi.hero::after { content: ""; position: absolute; right: -40px; bottom: -60px; width: 180px; height: 180px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 214, 102, .35), transparent 65%); }
.dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.hw-prog { display: grid; grid-template-columns: 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 4px; border-bottom: 1px solid var(--line2); }
.hw-prog:last-child { border: 0; }
.donut { width: 64px; height: 64px; position: relative; }
.donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.donut circle { fill: none; stroke-width: 7; }
.donut .bg { stroke: var(--line2); }
.donut .fg { stroke: var(--g1); stroke-linecap: round; transition: stroke-dashoffset 1.2s var(--ease); }
.donut b { position: absolute; inset: 0; display: grid; place-items: center; font-size: 14px; font-weight: 800; }
.seg-bar { display: flex; height: 8px; border-radius: 99px; overflow: hidden; background: var(--line2); margin-top: 8px; }
.seg-bar i { display: block; height: 100%; transition: width 1s var(--ease); }
.legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--ink3); margin-top: 6px; }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.chart { width: 100%; height: 220px; }
.chart .grid-l { stroke: var(--line2); stroke-dasharray: 3 4; }
.chart .area { fill: url(#area-g); }
.chart .line { fill: none; stroke: var(--g1); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1200; stroke-dashoffset: 1200; animation: draw 1.6s var(--ease) .2s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart .pt { fill: #fff; stroke: var(--g1); stroke-width: 2.5; }
.chart text { font-size: 11px; fill: var(--ink3); }
.risk { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line2); }
.risk:last-child { border: 0; }
.risk .why { font-size: 12px; color: #c7323c; }
.feed-item { display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: baseline; padding: 8px 0; font-size: 13.5px; }
.feed-item .dot { margin-top: 6px; }
.feed-item small { color: var(--ink3); font-size: 12px; white-space: nowrap; }
.focus-mix { display: flex; height: 14px; border-radius: 99px; overflow: hidden; margin: 6px 0 10px; }
.focus-mix i { height: 100%; }

/* ---------- 老师总览：班级花坛全景 ---------- */
.t-hero { position: relative; border-radius: 28px; overflow: hidden; isolation: isolate; margin-bottom: 18px; background: #cfe9f7;
  box-shadow: 0 30px 60px -32px rgba(24, 58, 38, .5), 0 2px 6px rgba(24, 58, 38, .08), inset 0 0 0 1px rgba(255,255,255,.5); }
.world.pano { aspect-ratio: auto; height: 340px; }
.pano .w-sky { background: linear-gradient(180deg, var(--s1) 0%, var(--s2) 28%, var(--s3) 50%, var(--s4) 64%); }
.pano .w-stars { inset: 0 0 40% 0; }
.pano .w-celestial { width: 4.4%; } .pano .w-celestial.moon { width: 3.1%; }
.pano .w-clouds { inset: 0 0 40% 0; }
.pano .w-birds { width: 3.4%; top: 16%; }
.pano .w-far { bottom: 42%; height: 24%; }
.pano .w-ground { top: 62%; }
.pano-hills { left: -3%; width: 106%; bottom: 35%; height: 20%; z-index: 5; }
.pano-hills .h2 { fill: var(--hill2); } .pano-hills .h1 { fill: var(--hill1); }
.pano-school { left: 64%; bottom: 41%; height: 23%; z-index: 5; overflow: visible; }
.pano-tree { bottom: 36%; z-index: 5; overflow: visible; filter: drop-shadow(0 6px 4px rgba(20, 50, 20, .14)); }
.pano-bed { left: 0; right: 0; bottom: 0; height: 38%; z-index: 8;
  background: radial-gradient(ellipse 60% 70% at 50% 100%, rgba(30, 80, 20, .16), transparent 70%); }
.cp { position: absolute; left: var(--x); bottom: 5%; width: 6.6%; aspect-ratio: 1; translate: -50% 0; z-index: 12; display: block;
  animation: cp-in .9s var(--spring, cubic-bezier(.34, 1.56, .64, 1)) both; animation-delay: calc(var(--i) * 22ms + .2s); }
.cp.r1 { bottom: 30%; width: 5.6%; z-index: 10; filter: saturate(.92) brightness(.97); }
.cp::before { content: ""; position: absolute; left: 22%; right: 22%; bottom: 3%; height: 11%; border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #a8744a, #6f4526 72%); }
.cp-plant { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transform-origin: 50% 94%; scale: var(--s);
  animation: sway 4.2s ease-in-out infinite; animation-delay: calc(var(--i) * -.37s); transition: scale .35s var(--spring, ease), filter .3s; }
.cp.weak .cp-plant { filter: saturate(.3) brightness(.92) sepia(.25); animation: droop 5.5s ease-in-out infinite; }
@keyframes droop { 0%, 100% { transform: rotate(7deg); } 50% { transform: rotate(10deg); } }
@keyframes cp-in { from { opacity: 0; translate: -50% 26%; } to { opacity: 1; translate: -50% 0; } }
.cp:hover, .cp:focus-visible { z-index: 40; }
.cp:hover .cp-plant, .cp:focus-visible .cp-plant { scale: calc(var(--s) * 1.18); filter: drop-shadow(0 0 10px rgba(255, 246, 190, .9)); }
.cp-tip { position: absolute; left: 50%; bottom: 96%; transform: translate(-50%, 6px); white-space: nowrap; padding: 7px 11px; border-radius: 12px; font-size: 12px; font-weight: 600;
  background: rgba(22, 38, 30, .92); color: #e8f5ec; opacity: 0; pointer-events: none; transition: .2s var(--ease); box-shadow: 0 10px 24px rgba(0,0,0,.2); }
.cp-tip b { color: #fff; margin-right: 6px; } .cp-tip small { display: block; color: #a9d6b7; font-weight: 600; margin-top: 2px; }
.cp:hover .cp-tip, .cp:focus-visible .cp-tip { opacity: 1; transform: translate(-50%, 0); }
.t-hero .scene-ui { pointer-events: none; }
.t-greet { max-width: 640px; align-items: flex-start; padding: 12px 20px 12px 12px; }
.t-greet .xh { margin-top: 2px; }
.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.hc { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; color: var(--ink2);
  background: rgba(255, 255, 255, .78); border: 1px solid rgba(30, 60, 40, .08); white-space: nowrap; transition: .2s; }
a.hc:hover { background: #fff; color: var(--ink); }
.hc b { color: var(--ink); }
.hc .live { width: 8px; height: 8px; border-radius: 50%; background: #2fbf6a; animation: live 1.8s infinite; }
.hc .live.off { background: #c9c3b3; animation: none; }
.pano-legend { padding: 7px 13px; border-radius: 14px; font-size: 11.5px; font-weight: 700; color: var(--ink2); text-align: right; line-height: 1.55; }
.pano-legend span { font-weight: 500; color: var(--ink3); }

.dash3 { display: grid; grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.t-pulse { max-height: 560px; }
.pi-ic.rose { background: var(--rose0); color: var(--rose); } .pi-ic.grape { background: var(--grape0); color: var(--grape); }
.risk .why { overflow: hidden; text-overflow: ellipsis; }
.tm-big { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 4px 0 14px; }
.tm-big > div { padding: 12px 14px; border-radius: 16px; background: var(--paper2, #f8f6ef); border: 1px solid var(--line2); }
.tm-big b { font-size: 26px; font-weight: 800; display: block; line-height: 1.1; }
.tm-big b small { font-size: 13px; margin-left: 1px; }
.tm-big span { font-size: 12px; color: var(--ink3); }
.tm-bar { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: var(--line2); gap: 2px; }
.tm-bar i { width: var(--w); background: var(--c); transform-origin: left; animation: grow-x .9s var(--ease) both; animation-delay: calc(var(--i) * 90ms + .3s); }
.tm-hours { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line2); }
.tm-h-t { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; margin-bottom: 10px; }
.tm-h-t .muted { font-size: 12px; }
.hours { display: grid; grid-template-columns: repeat(24, 1fr); gap: 3px; height: 74px; align-items: end; }
.hours i { height: max(3px, var(--h)); border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, #7fcf8d, #3ea765); transform-origin: bottom; animation: grow-y .8s var(--ease) both; animation-delay: calc(var(--i) * 25ms + .4s); }
.hours i.late { background: linear-gradient(180deg, #a497ff, #6a55e0); }
.hours i.zero { background: var(--line2); }
.hours-x { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink3); margin-top: 6px; }
/* 学生 · 我的作业 */
.hw-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; align-items: start; }
.lead-axis { position: relative; height: 16px; font-size: 11px; color: var(--ink3); margin: 2px 0 6px; --lw: 150px; --rw: 104px; }
.lead-axis span { position: absolute; transform: translateX(-50%); white-space: nowrap; left: calc(var(--lw) + (100% - var(--lw) - var(--rw)) * var(--p)); }
.lead-axis span:nth-child(1) { transform: none; }
.lead-axis .ddl { color: var(--rose); font-weight: 700; }
.lead-row { display: grid; grid-template-columns: var(--lw, 150px) 1fr var(--rw, 104px); gap: 0; align-items: center; height: 34px; animation: fade-up .5s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .2s); }
.lr-t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 12px; }
.lr-track { position: relative; height: 100%; background: linear-gradient(90deg, transparent calc(72% - 1px), rgba(236, 91, 100, .55) calc(72% - 1px) calc(72% + 1px), transparent calc(72% + 1px)),
  linear-gradient(90deg, rgba(47, 158, 98, .07), rgba(255, 196, 67, .1) 72%, rgba(236, 91, 100, .08) 72%); border-radius: 8px; }
.lead-row + .lead-row .lr-track { border-top: 1px dashed var(--line2); border-radius: 0; }
.lr-bar { position: absolute; top: 50%; height: 6px; margin-top: -3px; border-radius: 99px; background: var(--c, #2f9e62); opacity: .45; transform-origin: right; animation: grow-x .8s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .3s); }
.late .lr-bar { transform-origin: left; }
.lr-dot { position: absolute; top: 50%; width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px; border-radius: 50%; background: var(--c, #2f9e62); box-shadow: 0 0 0 3px #fff, 0 2px 6px rgba(0,0,0,.18); }
.lr-miss { white-space: nowrap; position: absolute; left: 76%; top: 50%; transform: translateY(-50%); font-style: normal; font-size: 11px; font-weight: 700; color: var(--grape2); background: var(--grape0); padding: 1px 8px; border-radius: 99px; }
.lr-v { font-size: 12px; font-weight: 700; text-align: right; color: var(--c, #1f7a4a); white-space: nowrap; }
.lead-row.early { --c: #2f9e62; } .lead-row.mid { --c: #6fbf5a; } .lead-row.last { --c: #d99a12; } .lead-row.late { --c: #ec5b64; } .lead-row.miss { --c: var(--grape2); }
.lead-tip { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(135deg, #f0f9f3, #fffaf0); font-size: 13px; color: var(--ink2); }
.lead-tip .xh { width: 34px; height: 34px; flex: none; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; }
.card:has(> .table) { overflow-x: auto; }
.table th { text-align: left; font-size: 12px; color: var(--ink3); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; cursor: default; user-select: none; }
.table th[data-sort] { cursor: pointer; }
.table th[data-sort]:hover { color: var(--ink); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line2); font-size: 13.5px; vertical-align: middle; }
.table tr { transition: background .15s; }
.table tbody tr:hover { background: var(--g00); }
.table tr.click { cursor: pointer; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .f { height: 34px; padding: 0 13px; border-radius: 11px; border: 1px solid var(--line); background: #fff; font-weight: 600; font-size: 13px; color: var(--ink2); display: inline-flex; align-items: center; gap: 6px; transition: .2s; }
.filters .f.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.stile { border-radius: 16px; padding: 11px 12px; background: #fff; border: 1.5px solid var(--line2); transition: .2s var(--ease); position: relative; display: block; }
.stile:hover { transform: translateY(-2px); box-shadow: var(--sh1); }
.stile b { font-size: 13.5px; display: block; }
.stile small { font-size: 11.5px; color: var(--ink3); display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stile .st { position: absolute; top: 10px; right: 10px; }
.stile.none { background: #fbfaf6; }
.stile.doing { border-color: #ffe1a1; background: #fffaf0; }
.stile.submitted { border-color: #c9e9d4; background: #f3fbf6; }
.stile.approved { border-color: #8fd0a9; background: #eaf7ef; }
.stile.returned { border-color: #f6cfd2; background: #fff6f6; }
.stile.late { border-color: #dcd5ff; background: #f6f3ff; }
.c-none { color: #c4bfae; } .c-doing { color: #f2a516; } .c-submitted { color: #3fbf7a; } .c-approved { color: #1f7a4a; } .c-returned { color: var(--rose); } .c-late { color: var(--grape); }
.review { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 18px; align-items: start; }
.queue { position: sticky; top: 84px; max-height: calc(calc(100vh / var(--zoom)) - 110px); overflow: auto; padding: 10px; }
.q-item { display: grid; grid-template-columns: 34px 1fr auto; gap: 10px; align-items: center; padding: 10px; border-radius: 14px; transition: .15s; }
.q-item:hover { background: var(--g00); }
.q-item.on { background: var(--ink); color: #fff; }
.q-item.on small { color: rgba(255,255,255,.7); }
.q-item b { font-size: 13.5px; display: block; }
.q-item small { font-size: 11.5px; color: var(--ink3); display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.answer-box { white-space: pre-wrap; background: #fffdf6; border: 1px solid #f1e8cf; border-radius: 16px; padding: 14px 16px; font-size: 14.5px; line-height: 1.9; }
.photos { display: flex; gap: 10px; flex-wrap: wrap; }
.photos img { width: 150px; height: 150px; object-fit: cover; border-radius: 14px; cursor: zoom-in; box-shadow: var(--sh1); transition: .2s; }
.photos img:hover { transform: scale(1.03); }
.run-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.run-chip { padding: 8px 12px; border-radius: 14px; background: var(--line2); font-size: 12.5px; }
.run-chip b { display: block; font-size: 13px; }
.run-chip.fast { background: var(--g0); } .run-chip.slow { background: var(--grape0); } .run-chip.rush { background: var(--sun0); } .run-chip.ok { background: var(--sky0); }
.grade-pick { display: flex; gap: 10px; }
.grade-pick button { flex: 1; height: 58px; border-radius: 16px; border: 2px solid var(--line); background: #fff; font-size: 22px; font-weight: 900; color: var(--ink3); transition: .2s var(--ease); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.grade-pick button small { font-size: 11px; font-weight: 600; }
.grade-pick button.on.A { border-color: #2f9e62; color: #2f9e62; background: var(--g0); }
.grade-pick button.on.B { border-color: #f2a516; color: #c98200; background: var(--sun0); }
.grade-pick button.on.C { border-color: #ec5b64; color: #ec5b64; background: var(--rose0); }
.task-edit { display: grid; grid-template-columns: 28px minmax(0, 1fr) 110px 90px 36px; gap: 8px; align-items: center; padding: 8px; border-radius: 14px; background: var(--g00); animation: fade-up .4s var(--ease) both; }
.task-edit + .task-edit { margin-top: 8px; }
.task-edit .n { width: 28px; height: 28px; border-radius: 9px; background: #fff; display: grid; place-items: center; font-weight: 800; font-size: 13px; color: var(--g2); }
.task-edit .input, .task-edit .select { height: 38px; border-radius: 10px; }
.task-edit .tipin { grid-column: 2 / 5; height: 34px; font-size: 13px; }
.md h2, .md h3 { font-size: 16px; margin: 18px 0 8px; display: flex; align-items: center; gap: 8px; }
.md h2::before, .md h3::before { content: ""; width: 4px; height: 16px; border-radius: 4px; background: var(--g1); }
.md p, .md li { color: var(--ink2); font-size: 14px; line-height: 1.85; }
.md ul, .md ol { padding-left: 20px; margin: 4px 0; }
.md b { color: var(--ink); }
.err-page { min-height: calc(100vh / var(--zoom)); display: grid; place-content: center; text-align: center; gap: 10px; }
.err-page svg { width: 140px; height: 130px; margin: 0 auto; animation: walk 1.4s ease-in-out infinite; }
.err-page b { font-size: 48px; font-weight: 900; color: var(--grape); }

/* ---------- 响应式 ---------- */
/* 2K / 4K 屏在 100% 缩放下整体放大，避免内容过小、两侧大片留白 */
:root { --zoom: 1; }
@media (min-width: 2200px) { :root { --zoom: 1.25; } html { zoom: 1.25; } }
@media (min-width: 2900px) { :root { --zoom: 1.6; } html { zoom: 1.6; } }
@media (max-width: 1360px) {
  .dash3 { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); }
  .dash3 .col-c { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .dash3 .col-c > * + * { margin-top: 0; }
}
@media (max-width: 1240px) {
  .home-grid3 { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
  .home-grid3 .col-c { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }
  .home-grid3 .col-c > * + * { margin-top: 0; }
}
@media (max-width: 1100px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .dash, .home-grid { grid-template-columns: 1fr; }
  .stat-strip, .rules-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reward-cards { grid-template-columns: repeat(3, 1fr); }
  .focus-grid { grid-template-columns: 1fr; }
  .review { grid-template-columns: minmax(0, 1fr); }
  .queue { position: static; max-height: 320px; }
}
@media (max-width: 1060px) {
  .hw-grid { grid-template-columns: 1fr; }
  .dash3, .dash3 .col-c { grid-template-columns: 1fr; }
  .pano-legend { display: none; }
}
@media (max-width: 860px) {
  .grid[style*="minmax(0"] { grid-template-columns: minmax(0, 1fr) !important; }
  .world.pano { height: 380px; }
  .pano .w-celestial { width: 9%; } .pano .w-celestial.moon { width: 6.5%; }
  .pano-school { left: 52%; height: 18%; }
  .cp { width: 9.5%; } .cp.r1 { width: 8%; }
  .t-greet .xh, .t-hero .scene-side { display: none; }
  .t-greet > div { min-width: 0; }
  .hero-chips .hc { font-size: 11.5px; height: auto; min-height: 26px; padding: 3px 10px; white-space: normal; }
  .tm-big b { font-size: 21px; }
  .lead-row, .lead-axis { --lw: 92px; --rw: 84px; }
  .lead-axis span:nth-child(1), .lr-miss { display: none; }

  .login { grid-template-columns: 1fr; }
  .login-art { min-height: 460px; }
  .t-shell { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; width: 260px; transform: translateX(-100%); transition: transform .3s var(--ease); }
  .side.open { transform: none; box-shadow: 20px 0 60px rgba(0,0,0,.25); }
  .t-top { padding: 0 16px; }
  #menu-btn { display: grid; }
  .t-page { padding: 18px 16px 60px; }
  .nav, .me-btn div { display: none; }
  .topbar { padding: 0 16px; gap: 10px; }
  .page { padding: 16px 14px 100px; }
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 10px; right: 10px; bottom: 10px; z-index: 60; height: 64px;
    border-radius: 22px; background: rgba(255,255,255,.92); backdrop-filter: blur(16px); box-shadow: 0 10px 30px rgba(28, 42, 33, .16); padding: 0 6px;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; font-size: 11px; font-weight: 700; color: var(--ink3); }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.on { color: var(--g1); }
  .home-grid3 { grid-template-columns: 1fr; }
  .home-grid3 .col-c { display: block; }
  .home-grid3 .col-c > * + * { margin-top: 14px; }
  .world { aspect-ratio: 1 / 1.02; --top: 52%; --x0: 7%; --w0: 66%; --x1: -3%; --w1: 86%; --row1: 69%; --row2: 85%; }
  .w-far { bottom: 47%; } .w-mid { bottom: 48%; height: 22%; } .w-ground { top: 51%; }
  .w-celestial { width: 11%; } .w-celestial.moon { width: 8%; }
  .monster { width: calc(17% * var(--s, 1)); }
  .m-tag { font-size: 10.5px; padding: 2px 7px; }
  .bfly { width: 5%; }
  .scene { border-radius: 24px; }
  .scene-ui { padding: 12px; flex-direction: column; }
  .greet { max-width: none; width: 100%; padding: 8px 12px 8px 8px; }
  .greet .xh { width: 40px; height: 40px; }
  .greet-hi { font-size: 15px; } .greet-tip { font-size: 12.5px; }
  .scene-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
  .clock { min-width: 0; padding: 6px 12px; text-align: left; }
  .clock .ct { font-size: 20px; } .clock .cs { display: none; }
  .threat { max-width: 62%; padding: 6px 10px 6px 6px; } .threat .ti { width: 30px; height: 30px; }
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { grid-template-columns: auto minmax(0, 1fr); padding: 14px; gap: 10px; min-height: 0; }
  .stat > :nth-child(3) { display: none; }
  .stat .s-ic, .ring-sm { width: 40px; height: 40px; }
  .stat .s-v { font-size: 22px; }
  .rules-band { grid-template-columns: 1fr; }
  .plant-cards, .reward-cards { grid-template-columns: repeat(2, 1fr); }
  .stat-tiles { grid-template-columns: repeat(2, 1fr); }
  .chat { grid-template-columns: 1fr; height: calc(calc(100vh / var(--zoom)) - 180px); }
  .chat-side { display: none; }
  .team-row { grid-template-columns: 24px 36px 1fr 70px; }
  .team-row .hide-sm { display: none; }
  .task-edit { grid-template-columns: 28px 1fr 80px 36px; }
  .task-edit .kind { display: none; }
  .task-edit .tipin { grid-column: 2 / 4; }
  .podium { gap: 8px; }
  .table .hide-sm { display: none; }
}
@media (max-width: 520px) {
  .t-page .row, .page .row { flex-wrap: wrap; }
  .grid[style*="1fr 1fr 1fr"] { grid-template-columns: 1fr !important; }
  .mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .mini-stats div { padding: 8px; } .mini-stats b { font-size: 16px; }
  .redeem-row { grid-template-columns: 46px minmax(0, 1fr); }
  .redeem-row > .row { grid-column: 1 / -1; justify-content: flex-end; }
  .kpis { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 14px; } .kpi .k-v { font-size: 24px; } .kpi .k-ic { display: none; }
  .plant-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .plant-card .pc-art { height: 110px; } .plant-card .pc-art svg { width: 84px; height: 84px; }
  .reward-cards { grid-template-columns: 1fr 1fr; gap: 10px; }
  .hw-card { grid-template-columns: 44px minmax(0, 1fr); }
  .hw-card .hw-cta { grid-column: 1 / -1; }
  .hw-card .hw-cta .btn { width: 100%; }
  .hw-ico { width: 44px; height: 44px; }
  .ring { width: 160px; height: 160px; } .ring-center b { font-size: 32px; }
}
