/* PA Web 首版样式：原生 CSS，无框架、无品牌色依赖。
   页面保持中性色；组件只用边框/间距/字号做层次。 */

:root {
  --ink: #1b1f24;
  --muted: #5b6572;
  --faint: #8a94a1;
  --line: #e3e6ea;
  --line-strong: #cfd5dc;
  --paper: #ffffff;
  --page: #f6f7f9;
  --accent: #2c5f8a;
  --warn: #8a5a00;
  --warn-bg: #fff8e8;
  --warn-line: #efd49a;
  --error: #a4232b;
  --error-bg: #fdf1f1;
  --error-line: #f0c7c9;
  --radius: 10px;
  --sidebar-width: 232px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font: 15px/1.65 var(--font);
  color: var(--ink);
  background: var(--page);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: #f1f3f5;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 4px;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.3;
  font-weight: 600;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
}

.muted {
  color: var(--muted);
}

.mono {
  font-family: var(--mono);
  font-size: 13px;
}

.num {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 12px;
  top: -48px;
  z-index: 20;
  padding: 8px 14px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
}

.skip-link:focus {
  top: 12px;
}

/* ---------------------------------------------------------------- 布局 */

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: var(--sidebar-width);
  flex: 0 0 var(--sidebar-width);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 14px 16px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 10px 18px;
}

.brand-centered {
  justify-content: center;
  padding-bottom: 22px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.02em;
  background: #fafbfc;
}

.brand-name {
  font-weight: 600;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink);
  font-size: 14px;
}

.nav-link:hover {
  background: #f2f4f6;
  text-decoration: none;
}

.nav-link.is-active {
  background: #eef1f4;
  font-weight: 600;
}

.nav-link.is-disabled {
  color: var(--faint);
  cursor: default;
}

.nav-link.is-disabled:hover {
  background: transparent;
}

.nav-top {
  margin-top: 6px;
}

.nav-sublist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 0 0 6px;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  margin-left: 20px;
}

.nav-sub {
  padding: 6px 10px;
  font-size: 13.5px;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px 10px 0;
  color: var(--faint);
  font-size: 12px;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px 16px;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.topbar-heading {
  min-width: 0;
}

.eyebrow {
  margin: 0 0 2px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.topbar-title {
  font-size: 22px;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.mode-chip {
  display: inline-block;
  padding: 2px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  background: #fafbfc;
  white-space: nowrap;
}

.inline-form {
  margin: 0;
}

.content {
  flex: 1;
  padding: 24px 28px 32px;
  width: 100%;
  max-width: 1120px;
}

.footer {
  padding: 14px 28px 20px;
  color: var(--faint);
  font-size: 12px;
  border-top: 1px solid var(--line);
}

/* ---------------------------------------------------------------- 组件 */

.stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.stack-actions {
  margin-top: 14px;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
}

.card-title {
  font-size: 16px;
  margin-bottom: 4px;
}

.sub-title {
  font-size: 14px;
  margin: 18px 0 8px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head p {
  margin-top: 4px;
}

.section-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

.metric-label {
  color: var(--muted);
  font-size: 13px;
}

.metric-value {
  margin: 6px 0 2px;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.metric-note {
  color: var(--faint);
  font-size: 12px;
}

.plain-list {
  list-style: none;
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.tag-list li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  background: #fafbfc;
}

.kv {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 8px 16px;
  margin: 10px 0 0;
}

.kv dt {
  color: var(--muted);
  font-size: 13.5px;
}

.kv dd {
  margin: 0;
}

.badge {
  display: inline-block;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fafbfc;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.8;
  white-space: nowrap;
}

.badge-soon {
  margin-left: 6px;
  color: var(--faint);
}

.badge-warn {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 5px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.btn:hover {
  background: #f2f4f6;
  text-decoration: none;
}

.btn-primary {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.btn-primary:hover {
  background: #303842;
  border-color: #303842;
}

.btn-ghost {
  background: transparent;
}

.btn:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

/* ---------------------------------------------------------------- 表格 */

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th,
.table td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  white-space: nowrap;
}

.table thead th {
  background: #fafbfc;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
}

.table tbody tr:last-child td {
  border-bottom: 0;
}

.table tbody tr:hover {
  background: #fafbfc;
}

.list-meta {
  margin-bottom: 10px;
  font-size: 13px;
}

.empty-state {
  padding: 42px 24px;
  text-align: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: #fcfcfd;
}

.empty-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}

/* ---------------------------------------------------------------- 提示 */

.alert {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 14px;
}

.alert-warn {
  border-color: var(--warn-line);
  background: var(--warn-bg);
  color: var(--warn);
}

.alert-error {
  border-color: var(--error-line);
  background: var(--error-bg);
  color: var(--error);
}

/* htmx 指示器（官方推荐样式） */
.htmx-indicator {
  opacity: 0;
  transition: opacity 160ms ease;
  font-size: 12px;
}

.htmx-request .htmx-indicator,
.htmx-request.htmx-indicator {
  opacity: 1;
}

/* ---------------------------------------------------------------- 登录页 */

.login-page {
  background: var(--page);
}

.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: 100%;
  max-width: 380px;
  padding: 28px 28px 24px;
}

.login-title {
  font-size: 20px;
  margin-bottom: 4px;
}

.login-subtitle {
  margin-bottom: 18px;
  font-size: 13.5px;
}

.login-note {
  margin-top: 16px;
  color: var(--faint);
  font-size: 12px;
  text-align: center;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form label {
  font-size: 13.5px;
  color: var(--muted);
}

.form input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  font: inherit;
  background: var(--paper);
  color: var(--ink);
}

.form input:disabled {
  background: #f4f5f7;
}

.form .btn {
  margin-top: 6px;
  min-height: 40px;
}

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 860px) {
  .layout {
    flex-direction: column;
  }

  .sidebar {
    width: auto;
    height: auto;
    position: static;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .nav {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .nav-sublist {
    display: none;
  }

  .sidebar-foot {
    display: none;
  }

  .topbar {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 18px;
  }

  .content {
    padding: 18px;
  }

  .footer {
    padding: 14px 18px 18px;
  }

  .kv {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .kv dt {
    margin-top: 8px;
  }
}

/* 空态单元格：表格仍保留表头，避免空态时列契约消失 */
.table td.empty-cell {
  padding: 0;
  white-space: normal;
}

.table td.empty-cell .empty-state {
  border: 0;
  border-radius: 0;
  background: transparent;
  margin: 0;
}

/* ---------------------------------------------------------------- 财务批次 */

.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: var(--muted);
}

.filter-field input {
  min-height: 36px;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  font: inherit;
}

.table td.wrap {
  white-space: normal;
  min-width: 240px;
  max-width: 420px;
  line-height: 1.5;
}

.small {
  font-size: 12px;
}


/* 鱼娘的数字小屋（首页场景，不使用外部图片） */
.brand-avatar{width:36px;height:36px;border-radius:50%;overflow:hidden;display:inline-flex;align-items:center;justify-content:center;background:rgba(120,200,255,.12);flex:0 0 auto}
.brand-avatar img{width:100%;height:100%;object-fit:cover;object-position:top center;transform:scale(2.1);transform-origin:top center}
.home-hero{padding:0;overflow:hidden}
.home-scene{position:relative;min-height:360px;display:grid;grid-template-columns:1fr 1fr;align-items:center;padding:34px 38px;background:linear-gradient(160deg,#0b1424 0%,#12253a 52%,#0b121d 100%)}
.home-copy{position:relative;z-index:3;max-width:430px}
.home-copy .card-title{font-size:clamp(30px,4vw,56px);margin:8px 0 10px}
.home-copy .eyebrow{color:#8fc9ff}
.home-actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:22px}
.home-avatar{position:relative;z-index:2;justify-self:center;width:min(100%,300px);max-height:430px;object-fit:contain;filter:drop-shadow(0 22px 44px rgba(0,0,0,.45))}
.home-scene::after{content:"";position:absolute;left:8%;right:8%;bottom:18px;height:1px;background:linear-gradient(90deg,transparent,rgba(150,210,255,.35),transparent)}
.scene-glow{position:absolute;width:320px;height:320px;right:8%;top:8%;border-radius:50%;background:radial-gradient(circle,rgba(70,150,255,.25),transparent 68%);filter:blur(8px)}
.scene-window{position:absolute;right:6%;top:10%;width:190px;height:160px;border:1px solid rgba(150,210,255,.18);border-radius:14px;background:linear-gradient(150deg,rgba(80,150,220,.10),transparent);box-shadow:inset 0 0 30px rgba(80,160,255,.08)}
.scene-lamp{position:absolute;left:6%;bottom:8%;width:110px;height:110px;border-radius:50%;background:radial-gradient(circle,rgba(255,190,110,.16),transparent 70%)}
@media (max-width:760px){
  .home-scene{grid-template-columns:1fr;padding:24px 20px 18px;min-height:520px;text-align:center}
  .home-copy{max-width:none}
  .home-avatar{width:min(78vw,300px);max-height:310px;margin-top:10px}
  .home-actions{justify-content:center}
  .scene-window{right:50%;transform:translateX(50%);top:6%;width:150px;height:120px}
}

/* 鱼娘首页：全屏房间 */
.home-mode body, body.home-mode{overflow:hidden}
body.home-mode .layout{display:block}
body.home-mode .sidebar,body.home-mode .topbar,body.home-mode .footer,body.home-mode .float-pet{display:none!important}
body.home-mode .main-wrap{width:100%;margin:0}
body.home-mode .content{padding:0;max-width:none}
/* --- 房间底：暖调黄昏室内；给 .home-world 加 style="--room-photo:url(...)" 可换成写实底图 --- */
.home-world{
  position:relative;min-height:100vh;overflow:hidden;color:#f6efe4;isolation:isolate;
  background:
    radial-gradient(120% 78% at 76% 26%,rgba(255,168,92,.26),transparent 58%),
    radial-gradient(80% 60% at 16% 6%,rgba(120,170,220,.14),transparent 62%),
    linear-gradient(180deg,#33241c 0%,#3d2b22 44%,#221812 100%);
}
.home-world[style*="--room-photo"]{background-image:var(--room-photo);background-size:cover;background-position:center}
/* 墙：暖涂料 + 极淡竖纹 + 顶部阴影 */
.room-wall{position:absolute;inset:0 0 20vh 0;background:
  linear-gradient(180deg,rgba(255,232,198,.12),rgba(255,232,198,0) 42%),
  repeating-linear-gradient(90deg,rgba(255,238,214,.03) 0 2px,transparent 2px 6px);
  box-shadow:inset 0 -110px 150px -70px rgba(0,0,0,.6)}
/* 踢脚线 */
.room-wall::after{content:"";position:absolute;left:0;right:0;bottom:0;height:15px;
  background:linear-gradient(180deg,#7a5335,#3b281b);
  box-shadow:0 9px 24px rgba(0,0,0,.5)}
/* 木地板（room-desk 复用为地面） */
.room-desk{position:absolute;left:0;right:0;bottom:0;height:20vh;border:0;background:
  linear-gradient(180deg,rgba(0,0,0,.42),rgba(0,0,0,.04) 26%,rgba(0,0,0,.5)),
  repeating-linear-gradient(90deg,rgba(255,216,170,.11) 0 1px,transparent 1px 78px),
  repeating-linear-gradient(180deg,rgba(0,0,0,.2) 0 2px,transparent 2px 36px),
  linear-gradient(180deg,#8a5a37 0%,#633d24 48%,#2c1b11 100%)}
.room-desk::before{content:"";position:absolute;left:0;right:0;top:0;height:3px;
  background:linear-gradient(90deg,transparent,rgba(255,214,158,.5),transparent)}
/* 窗：木框 + 夜色玻璃 + 月光 */
.room-window{position:absolute;left:7%;top:11%;width:21vw;height:29vh;min-width:180px;min-height:170px;
  border:9px solid #4a3323;border-radius:6px;
  background:
    radial-gradient(circle at 68% 26%,rgba(255,246,214,.5),transparent 26%),
    linear-gradient(170deg,#2b3c58 0%,#182437 55%,#0d1520 100%);
  box-shadow:inset 0 0 46px rgba(10,18,30,.85),0 22px 44px rgba(0,0,0,.5),0 0 0 1px rgba(255,220,180,.14)}
.room-window::before,.room-window::after{content:"";position:absolute;background:#4a3323}
.room-window::before{left:50%;top:0;bottom:0;width:7px;margin-left:-3px}
.room-window::after{left:0;right:0;top:52%;height:7px;margin-top:-3px}
/* 书架：木横板 + 书脊 */
.room-shelf{position:absolute;right:6%;top:16%;width:21vw;height:13px;border-radius:2px;
  background:linear-gradient(180deg,#9a6b45,#5c3d28);
  box-shadow:0 10px 18px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,222,180,.35)}
.room-shelf i{display:inline-block;width:20px;height:44px;margin:0 6px;border-radius:2px 2px 0 0;
  transform:translateY(-44px);
  background:linear-gradient(180deg,#c08a5c,#6e4730);
  box-shadow:inset -3px 0 6px rgba(0,0,0,.35),0 4px 10px rgba(0,0,0,.3)}
.room-shelf i:nth-child(2){height:52px;background:linear-gradient(180deg,#c9b483,#6d5a3a)}
.room-shelf i:nth-child(3){height:38px;background:linear-gradient(180deg,#7fa39b,#3f5d58)}
/* 主光源：落地灯（暖光锥） */
.room-lamp{position:absolute;right:17%;top:6%;width:78px;height:96px;border-radius:50% 50% 10% 10%;
  background:linear-gradient(180deg,rgba(255,214,150,.92),rgba(255,186,110,.32));
  box-shadow:0 0 90px 34px rgba(255,176,96,.3),inset 0 -14px 24px rgba(180,110,50,.35);filter:blur(.3px)}
.room-lamp::after{content:"";position:absolute;left:37px;top:92px;width:4px;height:24vh;
  background:linear-gradient(180deg,rgba(210,186,152,.7),rgba(210,186,152,.12))}
.home-top{position:absolute;z-index:5;left:clamp(20px,5vw,68px);right:clamp(20px,5vw,68px);top:clamp(18px,4vh,44px);display:flex;justify-content:space-between;align-items:flex-start;gap:20px}
.home-title .eyebrow{margin:0 0 8px;color:#f0c99a;letter-spacing:.12em}
.home-title h1{margin:0;font-size:clamp(23px,3.2vw,45px);font-weight:520;letter-spacing:.03em;color:#fff8eb}
.home-workbench{flex:0 0 auto;color:#fff2dc;text-decoration:none;border:1px solid rgba(255,225,185,.35);border-radius:999px;padding:10px 16px;font-size:14px;background:rgba(20,28,40,.38);backdrop-filter:blur(10px)}
.home-workbench:hover{border-color:rgba(255,225,185,.8);background:rgba(255,225,185,.1)}
.home-figure-wrap{position:absolute;z-index:3;left:50%;bottom:14vh;transform:translateX(-50%);width:min(39vw,430px);height:min(72vh,650px);display:flex;align-items:flex-end;justify-content:center}
.home-figure{max-width:100%;max-height:100%;object-fit:contain;filter:drop-shadow(0 26px 34px rgba(0,0,0,.42));transform:translate(var(--look-x,0),var(--look-y,0)) rotate(var(--look-rotate,0));transition:transform .18s ease-out,filter .2s ease;will-change:transform}
.home-figure.is-happy{filter:drop-shadow(0 26px 34px rgba(0,0,0,.42)) brightness(1.08) saturate(1.1)}
.home-figure.is-shy{filter:drop-shadow(0 26px 34px rgba(0,0,0,.42)) brightness(1.05)}
.home-shadow{position:absolute;bottom:-4px;left:14%;right:14%;height:26px;border-radius:50%;background:rgba(0,0,0,.36);filter:blur(10px)}
.home-bubble{position:absolute;z-index:6;left:50%;top:4%;transform:translateX(-50%);width:min(330px,72vw);padding:12px 16px;border-radius:16px 16px 16px 4px;background:rgba(255,248,235,.94);color:#2a2420;font-size:14px;line-height:1.65;box-shadow:0 12px 30px rgba(0,0,0,.22);transition:opacity .2s,transform .2s}
.home-bubble::after{content:"";position:absolute;left:24px;bottom:-7px;width:14px;height:14px;background:inherit;transform:rotate(45deg);border-radius:2px}
.home-bubble.is-pop{animation:bubblePop .32s ease}
@keyframes bubblePop{0%{transform:translateX(-50%) scale(.96)}100%{transform:translateX(-50%) scale(1)}}
.home-controls{position:absolute;z-index:6;left:50%;bottom:clamp(22px,4.5vh,52px);transform:translateX(-50%);display:flex;gap:10px;flex-wrap:wrap;justify-content:center;width:min(760px,92vw)}
.home-btn{appearance:none;border:1px solid rgba(255,240,218,.34);border-radius:999px;background:rgba(20,27,38,.55);color:#fff6e9;padding:12px 17px;font-size:14px;letter-spacing:.02em;cursor:pointer;backdrop-filter:blur(12px);transition:background .18s,border-color .18s,transform .18s;text-decoration:none;display:inline-flex;align-items:center;gap:8px;font-family:inherit}
.home-btn:hover{background:rgba(255,238,214,.16);border-color:rgba(255,238,214,.7);transform:translateY(-2px)}
.home-btn-main{background:rgba(214,158,102,.78);border-color:rgba(255,226,190,.72);color:#1f1913;font-weight:600}
.home-btn-icon{font-size:10px;opacity:.85}
.home-hint{position:absolute;z-index:4;left:50%;bottom:8px;transform:translateX(-50%);margin:0;color:rgba(255,246,232,.42);font-size:11px;letter-spacing:.06em;white-space:nowrap}
@media (max-width:760px){
  .home-top{top:22px;left:20px;right:20px}
  .home-title h1{font-size:25px}
  .home-workbench{font-size:12px;padding:8px 12px}
  .home-figure-wrap{bottom:19vh;width:min(72vw,330px);height:min(57vh,430px)}
  .home-bubble{top:0;width:min(300px,84vw);font-size:13px}
  .home-controls{bottom:28px;gap:8px}
  .home-btn{padding:10px 13px;font-size:13px}
  .home-hint{display:none}
  .room-window{left:-4%;top:15%;width:38vw;height:20vh}
  .room-shelf{right:-2%;top:20%;width:31vw}
}
.float-pet{position:fixed;z-index:40;right:22px;bottom:22px;width:58px;height:58px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:rgba(20,27,38,.52);border:1px solid rgba(255,230,200,.26);box-shadow:0 8px 24px rgba(0,0,0,.2);backdrop-filter:blur(8px);transition:transform .2s}
.float-pet:hover{transform:translateY(-3px) scale(1.04)}
.float-pet img{width:92%;height:92%;object-fit:contain}
.brand-avatar img{object-fit:contain;transform:none;width:100%;height:100%;padding:2px}

/* ================================================================
   鱼娘升级（2026-11-08）：品牌图标 / 小浮标 / 房间细节 / 占位卡
   ================================================================ */

/* 左上角品牌：协调图标，不再裁大头照 */
.brand-avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(120, 200, 255, 0.12);
  border: 1px solid rgba(120, 200, 255, 0.24);
  flex: 0 0 auto;
}
.brand-avatar img {
  width: 26px;
  height: 26px;
  padding: 0;
  object-fit: contain;
  transform: none;
}

/* 「鱼娘在做」徽标 */
.badge-working {
  margin-left: 6px;
  color: #8a5a00;
  border-color: #ecd3a1;
  background: #fff7e8;
  white-space: nowrap;
}

/* 工作台右下角的小浮标：小、半透明、不挡点击 */
body:not(.home-mode) .content {
  padding-bottom: 96px;
}
.float-pet {
  position: fixed;
  z-index: 60;
  right: 14px;
  bottom: 14px;
  width: 46px;
  height: 64px;
  border-radius: 23px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(18, 27, 40, 0.55);
  border: 1px solid rgba(255, 230, 200, 0.3);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(8px);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.float-pet:hover {
  transform: translateY(-3px) scale(1.04);
  background: rgba(18, 27, 40, 0.72);
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.3);
}
.float-pet img {
  width: 78%;
  height: 88%;
  object-fit: contain;
  filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.35));
  animation: petBreathe 5s ease-in-out infinite;
}
.float-pet.is-nudge {
  animation: petNudge 0.55s ease;
}
@keyframes petBreathe {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-1px) scale(1.025); }
}
@keyframes petNudge {
  0% { transform: translateY(0) rotate(0) scale(1); }
  35% { transform: translateY(-8px) rotate(-5deg) scale(1.05); }
  70% { transform: translateY(-2px) rotate(3deg) scale(1.02); }
  100% { transform: translateY(0) rotate(0) scale(1); }
}
@media (prefers-reduced-motion: reduce) {
  .float-pet img,
  .float-pet.is-nudge { animation: none; }
}

/* 首页房间补充：串灯 / 挂画 / 地毯 / 绿植 / 窗外月亮 */
.room-lights {
  position: absolute;
  z-index: 2;
  left: 7%;
  right: 7%;
  top: 5%;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translate(var(--room-x, 0), var(--room-y, 0));
  transition: transform 0.25s ease-out;
}
.room-lights span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ffe2b8;
  box-shadow: 0 0 12px 4px rgba(255, 206, 140, 0.35);
  opacity: 0.8;
}
.room-lights span:nth-child(2n) { transform: translateY(9px); opacity: 0.6; }
.room-lights span:nth-child(3n) { transform: translateY(16px); opacity: 0.75; }
.room-lights span:nth-child(4n) { transform: translateY(5px); }

.room-frame {
  position: absolute;
  z-index: 2;
  left: 13%;
  top: 45%;
  width: 112px;
  height: 86px;
  border: 6px solid rgba(178, 139, 99, 0.55);
  border-radius: 4px;
  background: linear-gradient(160deg, rgba(125, 185, 235, 0.16), rgba(255, 202, 142, 0.08));
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.22);
  transform: rotate(-2deg) translate(var(--room-x, 0), var(--room-y, 0));
  transition: transform 0.25s ease-out;
}
.room-frame::before {
  content: "";
  position: absolute;
  inset: 7px;
  border: 1px solid rgba(255, 230, 190, 0.24);
  border-radius: 2px;
}
.room-frame span {
  position: absolute;
  left: 16%;
  bottom: 16%;
  width: 42%;
  height: 30%;
  border-radius: 50% 50% 4px 4px;
  background: linear-gradient(180deg, rgba(140, 205, 255, 0.4), rgba(140, 205, 255, 0.06));
}

.room-rug {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 10vh;
  width: min(48vw, 540px);
  height: 11vh;
  border-radius: 50%;
  background: radial-gradient(ellipse at center, rgba(255, 196, 148, 0.16), rgba(255, 196, 148, 0.02) 72%);
  filter: blur(1px);
  transform: translateX(-50%);
}

.room-plant {
  position: absolute;
  z-index: 2;
  right: 6%;
  bottom: 13vh;
  width: 92px;
  height: 168px;
  pointer-events: none;
  filter: drop-shadow(0 12px 18px rgba(0, 0, 0, 0.28));
  transform: translate(var(--room-x, 0), var(--room-y, 0));
  transition: transform 0.25s ease-out;
}
.room-plant .pot {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 42px;
  height: 40px;
  transform: translateX(-50%);
  border-radius: 6px 6px 14px 14px;
  background: linear-gradient(180deg, #b07a56, #6d4531);
}
.room-plant .leaf {
  position: absolute;
  bottom: 34px;
  width: 34px;
  height: 58px;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(160deg, #86c791, #3d7d57);
  transform-origin: bottom center;
}
.room-plant .leaf-a { left: 50%; transform: translateX(-108%) rotate(-32deg); }
.room-plant .leaf-b { left: 50%; transform: translateX(-2%) rotate(26deg); height: 64px; }
.room-plant .leaf-c { left: 50%; bottom: 60px; transform: translateX(-56%) rotate(-4deg) scale(0.82); }

.room-window .room-moon {
  position: absolute;
  right: 18%;
  top: 16%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 36% 34%, #fff6dd, #f3d596 70%);
  box-shadow: 0 0 26px 8px rgba(255, 219, 150, 0.22);
}
.room-window .room-cloud {
  position: absolute;
  left: 12%;
  top: 58%;
  width: 46%;
  height: 12px;
  border-radius: 999px;
  background: rgba(190, 220, 255, 0.14);
  box-shadow: 18px -7px 0 2px rgba(190, 220, 255, 0.1);
}

/* 首页问候气泡：放在鱼娘右侧，不再盖住脸；窄屏移到上方 */
.home-bubble {
  z-index: 7;
  left: calc(50% + min(23vw, 300px));
  top: 17%;
  right: auto;
  transform: none;
  width: min(300px, 24vw);
  min-width: 200px;
}
.home-bubble::after {
  left: -6px;
  bottom: auto;
  top: 26px;
  transform: rotate(45deg);
}

/* 视频通话「开发中」标签 */
.home-btn-tag {
  margin-left: 2px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: 0.03em;
  color: #ffd9a8;
  border: 1px solid rgba(255, 201, 143, 0.45);
  background: rgba(255, 190, 120, 0.16);
  white-space: nowrap;
}

/* 工作台 hero：深色背景上的文字/按钮对比度 */
.home-copy .card-title { color: #fff8eb; }
.home-copy .muted { color: rgba(255, 244, 228, 0.68); }
.home-copy .eyebrow { color: #f0c99a; }
.home-actions .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 232, 198, 0.35);
  background: rgba(255, 240, 215, 0.12);
  color: #fff4e2;
  font-size: 13.5px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.home-actions .button:hover {
  background: rgba(255, 238, 214, 0.2);
  border-color: rgba(255, 238, 214, 0.7);
  transform: translateY(-1px);
  text-decoration: none;
}
.home-actions .button-primary {
  color: #21180e;
  background: #e3b07a;
  border-color: #f0d0a4;
  font-weight: 600;
}
.home-actions .button-primary:hover { background: #efc18d; }

/* 「鱼娘正在做」卡片 */
.fish-working-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.fish-working-icon {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  padding: 8px;
  border-radius: 15px;
  background: rgba(120, 200, 255, 0.12);
  border: 1px solid rgba(120, 200, 255, 0.24);
}
.fish-working .card-title { margin-bottom: 6px; }
.fish-working-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 20px;
}
.fish-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #7fc6f5;
  flex: 0 0 auto;
}
.fish-tag-list li { gap: 8px; }
.coming-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

/* 首页手机适配：标题/气泡/立绘/按钮不重叠 */
@media (max-width: 760px) {
  body.home-mode { overflow: hidden; }
  .home-top { top: 18px; left: 18px; right: 18px; }
  .home-title h1 { font-size: 24px; }
  .home-workbench { font-size: 12px; padding: 8px 12px; }
  .room-lights { top: 4%; left: 5%; right: 5%; }
  .room-lights span { width: 5px; height: 5px; }
  .room-frame { display: none; }
  .room-plant { right: 3%; bottom: 20vh; transform: scale(0.68); transform-origin: bottom right; }
  .room-rug { width: 78vw; bottom: 12vh; }
  .home-figure-wrap {
    bottom: 20vh;
    width: min(72vw, 330px);
    height: min(54vh, 430px);
  }
  .home-bubble {
    left: 50%;
    top: 88px;
    transform: translateX(-50%);
    width: min(320px, 86vw);
    min-width: 0;
    font-size: 13px;
    padding: 10px 14px;
  }
  .home-bubble::after {
    left: 50%;
    top: auto;
    bottom: -6px;
    transform: translateX(-50%) rotate(45deg);
  }
  .home-controls {
    bottom: 18px;
    width: calc(100vw - 32px);
    gap: 8px;
  }
  .home-btn { padding: 9px 12px; font-size: 12.5px; }
  .home-hint { display: none; }
  .float-pet {
    width: 40px;
    height: 56px;
    right: 10px;
    bottom: 10px;
    border-radius: 20px;
  }
  body:not(.home-mode) .content { padding-bottom: 82px; }
}

/* 手机端导航：横向滚动一行，工作台子菜单不再隐藏 */
@media (max-width: 860px) {
  .sidebar {
    position: sticky;
    top: 0;
    z-index: 30;
    width: auto;
    height: auto;
    padding: 12px 12px 8px;
    background: var(--paper);
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .brand { padding: 0 4px 10px; }
  .nav {
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 6px;
    overflow-x: auto;
    padding: 2px 2px 8px;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }
  .nav-link.nav-top {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 13.5px;
  }
  .nav-link.nav-top.is-active { background: #eef1f4; border-color: var(--line-strong); }
  .nav-sublist {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin: 0;
    padding: 0;
    border: 0;
    flex: 0 0 auto;
  }
  .nav-sublist li { flex: 0 0 auto; }
  .nav-link.nav-sub {
    white-space: nowrap;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: 12.5px;
  }
  .nav-link.nav-sub.is-active { background: #eef1f4; border-color: var(--line-strong); }
  .nav-sub.is-disabled { display: none; }
  .nav-top .badge { display: none; }
  .sidebar-foot { display: none; }
  .topbar { padding: 14px 16px 12px; }
  .topbar-title { font-size: 20px; }
  .content { padding: 16px 16px 86px; }
  .footer { padding: 12px 16px 18px; }
}

/* 手机端首页控制条：2×2 排布，不压到立绘 */
@media (max-width: 760px) {
  .home-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: calc(100vw - 40px);
    max-width: 420px;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
  }
  .home-btn {
    width: 100%;
    justify-content: center;
    text-align: center;
    padding: 10px 8px;
  }
}

/* 手机端：侧栏不再占 232px 高度，顶栏压成一行 */
@media (max-width: 860px) {
  .sidebar {
    flex: 0 0 auto;
  }
  .topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 12px 16px;
  }
  .topbar-heading { min-width: 0; }
  .topbar-title { font-size: 20px; }
  .topbar-actions { flex-shrink: 0; }
}

/* 房间里的沙发：让首页更像客厅 */
.room-sofa {
  position: absolute;
  z-index: 1;
  right: 5%;
  bottom: 17vh;
  width: min(23vw, 250px);
  height: 12vh;
  min-height: 88px;
  border-radius: 18px 18px 10px 10px;
  background: linear-gradient(180deg, rgba(118, 158, 205, 0.24), rgba(32, 48, 74, 0.34));
  border: 1px solid rgba(170, 205, 245, 0.14);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.2);
  transform: translate(var(--room-x, 0), var(--room-y, 0));
  transition: transform 0.25s ease-out;
}
.room-sofa::before {
  content: "";
  position: absolute;
  left: 6%;
  right: 6%;
  top: -30%;
  height: 52%;
  border-radius: 14px 14px 6px 6px;
  background: linear-gradient(180deg, rgba(138, 178, 222, 0.28), rgba(44, 64, 94, 0.32));
  border: 1px solid rgba(170, 205, 245, 0.12);
}
.room-sofa i {
  position: absolute;
  bottom: 12%;
  width: 38%;
  height: 34%;
  border-radius: 10px;
  background: rgba(126, 168, 214, 0.24);
  border: 1px solid rgba(180, 215, 250, 0.12);
}
.room-sofa i:first-child { left: 8%; }
.room-sofa i:last-child { right: 8%; }
@media (max-width: 760px) {
  .room-sofa { display: none; }
}

/* ================================================================
   视觉细化（Lead 2026-11-08）：暖光小屋 / 侧边气泡 / 简洁工作台
   ================================================================ */

/* 小屋：暖色为主，背景不再空旷 */
.home-world {
  background:
    radial-gradient(62% 46% at 50% 108%, rgba(255, 172, 96, 0.20), transparent 72%),
    radial-gradient(34% 38% at 84% 20%, rgba(255, 188, 120, 0.13), transparent 74%),
    linear-gradient(180deg, #0d1626 0%, #122338 54%, #0a0f18 100%);
}
.room-glow {
  position: absolute;
  z-index: 1;
  pointer-events: none;
  border-radius: 50%;
  filter: blur(16px);
}
.room-glow-main {
  left: 50%;
  bottom: 8vh;
  width: min(62vw, 760px);
  height: 46vh;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255, 178, 108, 0.20), rgba(255, 178, 108, 0) 70%);
}
.room-glow-lamp {
  right: 8%;
  top: 18%;
  width: 40vw;
  height: 52vh;
  background: radial-gradient(ellipse at center, rgba(255, 192, 124, 0.16), transparent 70%);
}
.room-window {
  background: linear-gradient(160deg, rgba(255, 208, 150, 0.14), rgba(33, 53, 84, 0.22));
  box-shadow:
    inset 0 0 70px rgba(255, 190, 120, 0.12),
    0 20px 54px rgba(0, 0, 0, 0.28);
}
.room-lamp {
  box-shadow: 0 0 120px 52px rgba(255, 190, 120, 0.2);
}
.room-lamp::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 190px;
  height: 30vh;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(255, 200, 140, 0.16), transparent 76%);
  clip-path: polygon(42% 0, 58% 0, 100% 100%, 0 100%);
  filter: blur(2px);
  pointer-events: none;
}
.room-frame {
  border-color: rgba(196, 152, 105, 0.62);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(255, 224, 184, 0.08) inset;
}
.room-frame span {
  background:
    radial-gradient(circle at 72% 28%, rgba(255, 231, 180, 0.9) 0 9%, transparent 10%),
    linear-gradient(180deg, #f3c890 0 46%, #b97b52 46% 62%, #4f6f80 62% 100%);
  border-radius: 4px;
  opacity: 0.92;
}
.room-rug {
  background:
    repeating-linear-gradient(115deg, rgba(255, 198, 150, 0.14) 0 10px, rgba(255, 198, 150, 0.05) 10px 20px),
    radial-gradient(ellipse at center, rgba(255, 196, 148, 0.24), rgba(255, 196, 148, 0.03) 72%);
  border: 1px solid rgba(255, 214, 174, 0.12);
}
.room-desk {
  background: linear-gradient(180deg, rgba(96, 70, 55, 0.86), rgba(26, 22, 24, 0.97));
  border-top: 1px solid rgba(255, 214, 166, 0.2);
  box-shadow: 0 -18px 42px rgba(255, 172, 96, 0.06);
}
.room-desk-items {
  position: absolute;
  z-index: 2;
  left: 0;
  right: 0;
  bottom: 19vh;
  height: 0;
  pointer-events: none;
  transform: translate(var(--room-x, 0), var(--room-y, 0));
  transition: transform 0.25s ease-out;
}
.desk-mug {
  position: absolute;
  left: 11%;
  bottom: 0;
  width: 26px;
  height: 30px;
  border-radius: 4px 4px 9px 9px;
  background: linear-gradient(180deg, #ecd9c6, #a9866d);
  box-shadow: 0 10px 16px rgba(0, 0, 0, 0.3);
}
.desk-mug::after {
  content: "";
  position: absolute;
  right: -9px;
  top: 8px;
  width: 13px;
  height: 14px;
  border: 3px solid #cdb39c;
  border-left: 0;
  border-radius: 0 9px 9px 0;
}
.desk-books {
  position: absolute;
  left: 17%;
  bottom: 0;
  width: 72px;
  height: 20px;
  border-radius: 3px;
  background: linear-gradient(180deg, #b4715f, #7c4539);
  box-shadow:
    0 -8px 0 -2px #4d6e86,
    0 -16px 0 -4px #c9a46b,
    0 12px 20px rgba(0, 0, 0, 0.28);
}
.room-sofa {
  background: linear-gradient(180deg, rgba(126, 166, 212, 0.26), rgba(36, 53, 80, 0.36));
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22), 0 0 44px rgba(255, 180, 110, 0.05);
}
.room-sofa i {
  background: rgba(150, 186, 224, 0.24);
}
.home-rimlight {
  position: absolute;
  z-index: 0;
  left: 50%;
  bottom: 2%;
  width: 72%;
  height: 86%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 62%, rgba(255, 190, 120, 0.16), transparent 66%);
  filter: blur(16px);
  pointer-events: none;
}
.home-figure { position: relative; z-index: 2; }
.home-figure-wrap .home-shadow { z-index: 1; }

/* 气泡：桌面固定在鱼娘右侧（不贴脸），最大 320 */
@media (min-width: 761px) {
  .home-bubble {
    top: 13%;
    left: calc(50% + min(23vw, 300px));
    width: min(320px, 26vw);
    min-width: 220px;
  }
  .home-bubble::after {
    left: -6px;
    top: 26px;
    bottom: auto;
    transform: rotate(45deg);
  }
}

/* 工作台：标题 + 操作 + 统计，去掉大块深色场景装饰 */
.workbench-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 22px 24px;
}
.workbench-head-main {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.workbench-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
  background: rgba(120, 200, 255, 0.12);
  border: 1px solid rgba(120, 200, 255, 0.24);
}
.workbench-mark img { width: 34px; height: 34px; }
.workbench-head .card-title { font-size: 19px; }
.workbench-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.workbench-section .section-label {
  margin: 0 0 8px 2px;
  color: var(--faint);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}

/* 小浮标再收一点，别挡内容 */
body:not(.home-mode) .content { padding-bottom: 110px; }
.float-pet {
  width: 42px;
  height: 58px;
  right: 12px;
  bottom: 12px;
  opacity: 0.9;
}
.float-pet:hover { opacity: 1; }

@media (max-width: 860px) {
  .workbench-head { padding: 16px; align-items: flex-start; }
  .workbench-actions { width: 100%; }
  .workbench-actions .btn { flex: 1 1 auto; justify-content: center; }
  body:not(.home-mode) .content { padding-bottom: 100px; }
}

/* 气泡放到鱼娘左侧（箭头指向她），不挡住脸和上半身 */
@media (min-width: 761px) {
  .home-bubble {
    left: auto;
    right: calc(50% + min(19.5vw, 215px) + 14px);
    top: 22%;
    width: min(320px, 25vw);
    min-width: 0;
    transform: none;
  }
  .home-bubble::after {
    left: auto;
    right: -6px;
    top: 26px;
    bottom: auto;
    transform: rotate(45deg);
  }
}

/* 暖光收敛一点，避免像探照灯 */
.room-lamp::before { opacity: 0.55; filter: blur(4px); }

/* 小浮标再收一圈，尽量落在内容之外的边角 */
.float-pet {
  width: 38px;
  height: 52px;
  right: 6px;
  bottom: 8px;
  opacity: 0.86;
}
.float-pet:hover { opacity: 1; }
@media (max-width: 860px) {
  .float-pet { width: 36px; height: 50px; right: 8px; bottom: 8px; }
}

/* 给右下角小浮标留出右侧空白，避免盖住表格/按钮 */
body:not(.home-mode) .content {
  padding-right: 64px;
}
@media (max-width: 860px) {
  body:not(.home-mode) .content {
    padding-right: 52px;
    padding-bottom: 100px;
  }
}

.workbench-note {
  margin: -2px 0 10px 2px;
  font-size: 13px;
}


/* ===== 小屋改造：家具材质与光感（覆盖前面的占位样式） ===== */
/* 灯光锥：从台灯向地面铺开 */
.room-glow-main{position:absolute;right:9%;top:16%;width:46vw;height:70vh;pointer-events:none;
  background:radial-gradient(60% 70% at 62% 22%,rgba(255,186,110,.30),rgba(255,186,110,.06) 46%,transparent 72%);
  filter:blur(18px);clip-path:polygon(52% 0,72% 0,100% 100%,18% 100%)}
.room-glow-lamp{position:absolute;right:19%;top:9%;width:220px;height:220px;border-radius:50%;
  background:radial-gradient(circle,rgba(255,196,120,.42),transparent 66%);filter:blur(22px)}
/* 光点：改成萤火，弱下去 */
.room-lights{position:absolute;inset:0;pointer-events:none}
.room-lights span{position:absolute;width:4px;height:4px;border-radius:50%;background:rgba(255,226,170,.75);
  box-shadow:0 0 12px 4px rgba(255,200,130,.45);animation:roomFloat 9s ease-in-out infinite}
.room-lights span:nth-child(1){left:14%;top:26%}
.room-lights span:nth-child(2){left:26%;top:44%;animation-delay:-2s}
.room-lights span:nth-child(3){left:64%;top:18%;animation-delay:-4s}
.room-lights span:nth-child(4){left:78%;top:38%;animation-delay:-6s}
.room-lights span:nth-child(5){left:44%;top:12%;animation-delay:-3s}
.room-lights span:nth-child(6){left:88%;top:22%;animation-delay:-5s}
@keyframes roomFloat{0%,100%{transform:translateY(0);opacity:.5}50%{transform:translateY(-14px);opacity:.95}}
/* 挂画：木框 + 米色画面 */
.room-frame{position:absolute;left:11%;top:47%;width:110px;height:82px;border:6px solid #5b3f2a;border-radius:3px;
  background:linear-gradient(160deg,#e8d6b8,#c9ab86);box-shadow:0 14px 26px rgba(0,0,0,.45)}
.room-frame::before{content:"";position:absolute;inset:8px;border-radius:2px;
  background:linear-gradient(150deg,#d9a468,#8a5b3a 60%,#3f5866)}
/* 沙发：靠背 + 坐垫 + 扶手 */
.room-sofa{position:absolute;right:5%;bottom:17vh;width:24vw;min-width:220px;height:15vh;
  border-radius:14px 14px 8px 8px;
  background:linear-gradient(180deg,#6d5a58 0%,#4a3b3b 60%,#2f2626 100%);
  box-shadow:0 26px 44px rgba(0,0,0,.5),inset 0 2px 0 rgba(255,222,190,.16)}
.room-sofa::before{content:"";position:absolute;left:6%;right:6%;top:-42%;height:52%;border-radius:12px 12px 6px 6px;
  background:linear-gradient(180deg,#7d6866,#4f3f3f);box-shadow:inset 0 2px 0 rgba(255,222,190,.2),0 8px 18px rgba(0,0,0,.35)}
.room-sofa i{position:absolute;bottom:8px;width:44%;height:56%;border-radius:8px;
  background:linear-gradient(180deg,rgba(255,214,168,.24),rgba(255,214,168,.06));
  box-shadow:inset 0 0 0 1px rgba(255,222,190,.14)}
.room-sofa i:nth-child(1){left:5%}.room-sofa i:nth-child(2){right:5%}
/* 地毯：椭圆 + 织纹 + 边缘柔化 */
.room-rug{position:absolute;left:50%;bottom:6vh;transform:translateX(-50%);width:56vw;height:16vh;
  border-radius:50%;
  background:
    repeating-radial-gradient(ellipse at center,rgba(255,224,186,.10) 0 2px,transparent 2px 11px),
    radial-gradient(ellipse at center,rgba(150,96,62,.85),rgba(96,60,38,.55) 62%,transparent 74%);
  filter:blur(.4px)}
/* 绿植：叶片 + 花盆 + 落影 */
.room-plant{position:absolute;right:9%;bottom:19vh;width:96px;height:120px}
.room-plant .pot{position:absolute;left:22px;bottom:0;width:54px;height:44px;border-radius:4px 4px 10px 10px;
  background:linear-gradient(180deg,#a5714c,#6a4429);box-shadow:0 10px 20px rgba(0,0,0,.45)}
.room-plant .leaf{position:absolute;width:26px;height:52px;border-radius:50% 50% 50% 50%;
  background:linear-gradient(160deg,#6f9b6a,#2f5240);box-shadow:inset 0 -6px 12px rgba(0,0,0,.3)}
.room-plant .leaf-a{left:30px;bottom:36px;transform:rotate(-18deg)}
.room-plant .leaf-b{left:8px;bottom:30px;transform:rotate(-42deg);height:44px}
.room-plant .leaf-c{left:52px;bottom:30px;transform:rotate(24deg);height:46px}
/* 桌上物件：暖色 */
.room-desk-items .desk-mug{position:absolute;left:11%;bottom:9vh;width:26px;height:30px;border-radius:4px 4px 8px 8px;
  background:linear-gradient(180deg,#efe2cc,#b9a58a);box-shadow:0 8px 16px rgba(0,0,0,.45)}
.room-desk-items .desk-books{position:absolute;left:16%;bottom:8vh;width:74px;height:18px;border-radius:3px;
  background:linear-gradient(180deg,#8f5f42,#5a3a26);box-shadow:0 3px 0 #3c2717,0 10px 18px rgba(0,0,0,.45)}
/* 气泡：移到右下，不再压住窗户和人脸 */
.home-bubble{left:auto;right:clamp(16px,4vw,54px);top:auto;bottom:clamp(150px,24vh,220px);
  transform:none;max-width:min(300px,62vw);border-radius:16px 16px 4px 16px;
  background:rgba(255,248,235,.95);box-shadow:0 16px 36px rgba(0,0,0,.35)}
.home-bubble::after{left:auto;right:26px;bottom:-7px}
/* 人像与地面接触阴影更实 */
.home-shadow{background:radial-gradient(ellipse at center,rgba(0,0,0,.55),transparent 70%)}

/* ===== 小屋改造 v2：暖化墙面 / 缩窗加帘 / 重排家具 ===== */
/* 墙面加暖，压掉冷感 */
.home-world{background:
  radial-gradient(90% 66% at 74% 22%,rgba(255,170,96,.34),transparent 60%),
  radial-gradient(70% 50% at 10% 4%,rgba(255,196,140,.10),transparent 62%),
  linear-gradient(180deg,#3b2a20 0%,#452f22 46%,#241a13 100%)}
.room-wall{background:
  linear-gradient(180deg,rgba(255,226,186,.20),rgba(255,226,186,.02) 46%,rgba(0,0,0,.30)),
  repeating-linear-gradient(90deg,rgba(255,236,206,.05) 0 2px,transparent 2px 7px);
  box-shadow:inset 0 -110px 150px -70px rgba(0,0,0,.55)}
/* 窗缩小、加窗帘，减少冷色面积 */
.room-window{left:6%;top:13%;width:15vw;height:23vh;min-width:150px;min-height:140px;
  box-shadow:inset 0 0 40px rgba(8,14,24,.8),0 20px 38px rgba(0,0,0,.5),0 0 0 1px rgba(255,220,180,.16)}
.room-window::before{width:6px;margin-left:-3px}
.room-window::after{height:6px;margin-top:-3px}
.home-world .room-window::after{box-shadow:none}
/* 窗帘 */
.room-wall .curtain-l,.room-wall .curtain-r{position:absolute;top:11%;width:26px;height:26vh;
  background:linear-gradient(90deg,rgba(214,158,108,.85),rgba(150,96,58,.6));
  border-radius:3px;box-shadow:0 10px 24px rgba(0,0,0,.4)}
/* 沙发：缩小并贴右下角，不再压气泡 */
.room-sofa{right:4%;bottom:15vh;width:18vw;min-width:170px;height:12vh;
  background:linear-gradient(180deg,#7a6350 0%,#513f33 62%,#31251d 100%)}
.room-sofa::before{height:46%;top:-36%;background:linear-gradient(180deg,#8a725c,#544234)}
/* 绿植移到沙发左侧地面，避开遮挡 */
.room-plant{right:23%;bottom:14vh;width:84px;height:112px}
/* 地毯缩小居中，别铺满 */
.room-rug{width:44vw;height:13vh;bottom:5vh}
/* 气泡抬高一点，避开沙发靠背 */
.home-bubble{bottom:clamp(210px,30vh,290px);right:clamp(20px,5vw,64px)}
/* 地面反光：台灯在地板上的一小片暖光 */
.home-world::after{content:"";position:absolute;right:12%;bottom:2vh;width:34vw;height:12vh;
  background:radial-gradient(ellipse at center,rgba(255,186,110,.28),transparent 68%);
  filter:blur(14px);pointer-events:none}



/* realistic room layer: the scene is a photo, furniture CSS is only fallback */
.home-world{background:#191718 url("/static/room-realistic.jpg") center/cover no-repeat!important;}
.home-world::before{content:"";position:absolute;inset:0;z-index:0;background:linear-gradient(90deg,rgba(14,17,23,.32),rgba(14,17,23,.06) 52%,rgba(14,17,23,.3)),linear-gradient(0deg,rgba(12,13,18,.48),transparent 52%);pointer-events:none}
.home-world .room-wall,.home-world .room-window,.home-world .room-shelf,.home-world .room-lamp,.home-world .room-rug,.home-world .room-sofa,.home-world .room-plant,.home-world .room-desk,.home-world .room-desk-items,.home-world .room-frame,.home-world .room-lights{opacity:0;pointer-events:none}
.home-figure{filter:drop-shadow(0 28px 35px rgba(0,0,0,.44)) drop-shadow(0 0 16px rgba(255,216,170,.12));}
.home-figure-wrap{z-index:4}
.home-bubble{z-index:8;left:calc(50% - min(20vw,210px));top:9%;}
.brand-avatar{overflow:hidden;background:rgba(24,28,36,.48);}
.brand-avatar img{object-fit:contain!important;object-position:center!important;transform:scale(1.03)!important;padding:2px!important;}
.float-pet img,.fish-working-icon,.call-avatar{object-fit:contain!important;object-position:center!important;}
@media (max-width:760px){.home-bubble{left:50%;top:5%;}.home-world{background-position:center center!important;}.home-figure-wrap{bottom:18vh;}}

.home-pose-sep{width:1px;height:22px;background:rgba(255,238,214,.22);align-self:center;margin:0 2px}
.home-btn-pose{padding:9px 12px;font-size:12px;opacity:.88}
.home-figure-wrap{transition:left .45s ease,bottom .45s ease,width .45s ease,height .45s ease}
.home-figure.pose-sit{transform:translate(26%,-2%) rotate(-1deg) scale(.92);transform-origin:50% 100%}
.home-figure.pose-lie{transform:translate(10%,18%) rotate(72deg) scale(.82);transform-origin:50% 100%;}
.home-figure.pose-stand{transform:translate(var(--look-x,0),var(--look-y,0)) rotate(var(--look-rotate,0));}
@media (max-width:760px){.home-pose-sep{display:none}.home-btn-pose{padding:8px 10px;font-size:11px}.home-figure.pose-sit{transform:translate(18%,-2%) scale(.88)}.home-figure.pose-lie{transform:translate(8%,16%) rotate(70deg) scale(.76)}}

/* subtitle at the bottom of the scene; never cover the character */
.home-bubble,.home-bubble::after{display:none!important}
.home-subtitle{position:absolute;z-index:9;left:50%;bottom:clamp(125px,19vh,180px);transform:translateX(-50%);width:min(760px,88vw);padding:10px 18px;text-align:center;color:#fffaf2;font-size:clamp(14px,1.5vw,19px);line-height:1.55;text-shadow:0 2px 10px rgba(0,0,0,.85),0 0 2px rgba(0,0,0,.9);pointer-events:none}
.home-subtitle.is-pop{animation:subtitlePop .26s ease}
@keyframes subtitlePop{0%{opacity:.45;transform:translateX(-50%) translateY(4px)}100%{opacity:1;transform:translateX(-50%) translateY(0)}}
@media(max-width:760px){.home-subtitle{bottom:clamp(140px,22vh,190px);width:88vw;font-size:13px;padding:8px 12px}}

/* transparent cutout + idle motion; transform is reserved for pointer look */
.home-figure{object-fit:contain;background:transparent;transform-origin:50% 100%;animation:figureBreathe 4.6s ease-in-out infinite;}
@keyframes figureBreathe{0%,100%{scale:1}50%{scale:1.018}}
.home-figure.pose-stand{animation:figureBreathe 4.6s ease-in-out infinite}
.home-figure.pose-sit{animation:figureBreathe 5.2s ease-in-out infinite}
.home-figure.pose-lie{animation:figureBreathe 6.2s ease-in-out infinite}
.home-figure-wrap .home-shadow{opacity:.72;filter:blur(12px)}
@media (prefers-reduced-motion: reduce){.home-figure{animation:none!important}}

.home-figure.pose-sit{transform:translate(24%,-1%) scale(.96);transform-origin:50% 100%}
.home-figure.pose-lie{transform:translate(12%,16%) scale(.9);transform-origin:50% 100%}
.home-figure.pose-stand{transform:translate(var(--look-x,0),var(--look-y,0)) rotate(var(--look-rotate,0))}
@media(max-width:760px){.home-figure.pose-sit{transform:translate(16%,-1%) scale(.9)}.home-figure.pose-lie{transform:translate(8%,14%) scale(.84)}}

/* 记忆星云 */
.memory-page{max-width:1180px;margin:0 auto}
.memory-head{display:flex;justify-content:space-between;gap:22px;align-items:end;margin-bottom:18px}
.memory-head .card-title{margin:6px 0 8px}
.memory-tools{display:flex;gap:8px;flex-wrap:wrap}
.memory-input,.memory-select{background:rgba(255,255,255,.06);border:1px solid rgba(150,205,255,.2);color:var(--text,#e8eef7);border-radius:10px;padding:9px 12px;font:inherit;min-width:150px}
.memory-input:focus,.memory-select:focus{outline:none;border-color:rgba(150,205,255,.65)}
.memory-select option{background:#172033;color:#e8eef7}
.memory-canvas-wrap{position:relative;height:min(62vh,620px);min-height:360px;border:1px solid rgba(150,205,255,.14);border-radius:18px;overflow:hidden;background:radial-gradient(circle at 50% 45%,rgba(32,53,82,.7),rgba(8,12,20,.96) 72%);touch-action:none}
#memoryCanvas{display:block;width:100%;height:100%;cursor:grab}
#memoryCanvas:active{cursor:grabbing}
.memory-empty{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;pointer-events:none}
.memory-empty[hidden]{display:none}
.memory-hint{position:absolute;left:16px;bottom:12px;margin:0;color:rgba(232,238,247,.55);font-size:12px;letter-spacing:.04em;pointer-events:none}
.memory-detail{position:relative;margin-top:14px;padding:18px 20px;border:1px solid rgba(150,205,255,.18);border-radius:14px;background:rgba(20,31,49,.72)}
.memory-detail[hidden]{display:none}
.memory-detail h3{margin:4px 0 4px}
.memory-close{position:absolute;right:12px;top:8px;background:none;border:0;color:#a9c7e8;font-size:22px;cursor:pointer}
.memory-list{display:none;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:10px;margin-top:14px}
.memory-list-item{display:flex;gap:10px;align-items:flex-start;text-align:left;border:1px solid rgba(150,205,255,.12);background:rgba(255,255,255,.035);border-radius:12px;padding:12px;color:inherit;cursor:pointer;font:inherit}
.memory-list-item:hover{border-color:rgba(150,205,255,.4);background:rgba(255,255,255,.065)}
.memory-list-item span{display:flex;flex-direction:column;gap:4px;min-width:0}
.memory-list-item strong{font-size:14px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.memory-list-item small{color:rgba(232,238,247,.55);font-size:12px}
.memory-dot{width:9px;height:9px;border-radius:50%;flex:0 0 auto;margin-top:4px;box-shadow:0 0 12px currentColor}
@media(max-width:760px){.memory-head{display:block}.memory-tools{margin-top:12px}.memory-canvas-wrap{height:380px}.memory-list{display:grid}}

/* 2026-11-15 小屋镜头推近：人物更大，手机端优先 */
.home-figure-wrap{width:min(47vw,560px);height:min(80vh,720px);bottom:9vh}
@media (max-width:760px){
  .home-figure-wrap{width:min(82vw,360px);height:min(62vh,470px);bottom:16vh}
}


/* 2026-11-15 写实卧室底图：有照片时隐藏 CSS 房间装饰，保留人物/字幕/控制 */
.home-world[style*="--room-photo"] .room-wall,
.home-world[style*="--room-photo"] .room-window,
.home-world[style*="--room-photo"] .room-frame,
.home-world[style*="--room-photo"] .room-shelf,
.home-world[style*="--room-photo"] .room-lamp,
.home-world[style*="--room-photo"] .room-rug,
.home-world[style*="--room-photo"] .room-sofa,
.home-world[style*="--room-photo"] .room-plant,
.home-world[style*="--room-photo"] .room-desk,
.home-world[style*="--room-photo"] .room-desk-items,
.home-world[style*="--room-photo"] .room-glow{display:none!important}


/* 2026-11-15 左侧一级默认折叠 */
.nav-group{margin:0}
.nav-group>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}
.nav-group>summary::-webkit-details-marker{display:none}
.nav-group>summary>a{color:inherit;text-decoration:none;flex:1}
.nav-group .nav-chevron{font-size:14px;opacity:.6;transition:transform .18s}
.nav-group[open] .nav-chevron{transform:rotate(180deg)}
.nav-group>.nav-sublist{margin-top:4px}
