:root{--bg:#171126;--surface:rgba(34,25,50,.88);--surface2:rgba(49,35,69,.82);--line:rgba(223,194,239,.22);--text:#f5edf8;--muted:#b6a5c2;--accent:#a66dca;--yun:#9b73d8;--star:#e77fa8;--yan:#6681c5;--safe-bottom:env(safe-area-inset-bottom,0px)}
*{box-sizing:border-box}html,body{width:100%;height:100%;margin:0}body{overflow:hidden;color:var(--text);font-family:"Noto Serif SC","Songti SC",serif;background:#100b1b url("/img/themes/chatroom-trio.webp") center top/cover fixed no-repeat}body::before{content:"";position:fixed;inset:0;background:linear-gradient(180deg,rgba(12,7,23,.27),rgba(12,7,23,.58));pointer-events:none}.app{position:relative;width:min(100%,780px);height:100%;margin:auto;display:flex;flex-direction:column;background:rgba(15,10,25,.18);box-shadow:0 0 70px rgba(0,0,0,.25)}
button,input,textarea,select{font:inherit}.topbar{height:58px;flex:0 0 auto;display:flex;align-items:center;gap:4px;padding:calc(4px + env(safe-area-inset-top)) 10px 4px;border-bottom:1px solid var(--line);background:rgba(23,17,38,.8);backdrop-filter:blur(16px)}.icon-btn{width:38px;height:38px;border:0;border-radius:10px;background:transparent;color:var(--text);font-size:20px;cursor:pointer}.back-btn{display:grid;place-items:center;text-decoration:none;font-size:29px;font-family:Arial,sans-serif;font-weight:300}.icon-btn:active{background:rgba(255,255,255,.08)}.room-heading{min-width:0;flex:1;text-align:center}.room-heading b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;letter-spacing:.08em}.room-heading small{display:flex;justify-content:center;align-items:center;gap:5px;margin-top:2px;color:var(--muted);font-size:9px}.online-dot{width:6px;height:6px;border-radius:50%;background:#8d8494}.online-dot.on{background:#79c590;box-shadow:0 0 7px rgba(121,197,144,.8)}.online-dot.warn{background:#d5a657}
.yun-tone{background:var(--yun)}.yan-tone{background:var(--yan)}.both-tone{background:linear-gradient(135deg,var(--yun),var(--yan))}.chat-tone{background:#7e5a92}
.messages{flex:1;min-height:0;padding:14px 15px 20px;overflow-y:auto;display:flex;flex-direction:column;gap:13px;scroll-behavior:smooth}.empty{margin:auto;text-align:center;color:var(--muted);font-size:11px}.empty strong{display:block;margin-bottom:6px;color:#e7c9f5;font-size:16px;font-weight:400;letter-spacing:.14em}.empty span{display:block}.row{display:flex;align-items:flex-end;gap:7px}.row.star{justify-content:flex-end}.avatar{width:30px;height:30px;flex:0 0 auto;border-radius:50%;object-fit:cover;box-shadow:0 3px 10px rgba(0,0,0,.26)}.packet{max-width:min(76%,560px)}.name{margin:0 8px 4px;color:var(--muted);font:9px "Courier Prime",monospace}.star .name{text-align:right}.bubble{padding:9px 12px;border:1px solid var(--line);border-radius:15px 15px 15px 3px;background:var(--surface);box-shadow:0 7px 18px rgba(0,0,0,.16);backdrop-filter:blur(14px);font-size:13px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere}.star .bubble{border-color:rgba(231,127,168,.5);border-radius:15px 15px 3px 15px;background:rgba(185,86,128,.88)}.yun .bubble{border-left:2px solid var(--yun)}.yanshen .bubble{border-left:2px solid var(--yan)}.bubble.error{color:#d6bfcd;font-size:11px}.msg-images{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px;margin-top:7px}.msg-images.one{grid-template-columns:1fr}.msg-images img{display:block;width:100%;max-width:240px;max-height:280px;border-radius:8px;object-fit:cover}.msg-time{margin:3px 7px;color:var(--muted);font:8px "Courier Prime",monospace}.star .msg-time{text-align:right}
.typing{min-height:0;padding:0 52px;color:#cbb7d6;font-size:10px;transition:.18s}.typing.show{min-height:24px;padding-top:2px;padding-bottom:6px}.typing::after{content:"";display:inline-block;width:14px;height:4px;margin-left:6px;background:radial-gradient(circle,#d8b6e8 1.6px,transparent 2px) 0 0/7px 4px;animation:dots 1s steps(3) infinite}@keyframes dots{50%{opacity:.25}}
.composerbar{flex:0 0 auto;display:flex;align-items:flex-end;gap:7px;padding:9px 12px calc(9px + var(--safe-bottom));border-top:1px solid var(--line);background:rgba(27,19,42,.9);backdrop-filter:blur(18px)}.round-btn,.mention-btn,.send-btn{height:40px;flex:0 0 auto;border:0;border-radius:11px;cursor:pointer}.round-btn{width:40px;border:1px solid var(--line);background:rgba(255,255,255,.055);color:var(--text);font-size:21px}.mention-btn{min-width:52px;padding:0 9px;border:1px solid rgba(215,180,234,.35);background:rgba(166,109,202,.16);color:#eadcf1;font-size:10px;white-space:nowrap}.mention-btn:active{background:rgba(166,109,202,.3)}.send-btn{min-width:50px;padding:0 15px;background:linear-gradient(135deg,#a66dca,#72529f);color:#fff;font-size:12px}.send-btn:disabled{opacity:.45}.composer{flex:1;min-width:0}.composer textarea{display:block;width:100%;height:40px;min-height:40px;max-height:120px;resize:none;border:1px solid var(--line);border-radius:11px;padding:9px 11px;background:rgba(15,10,25,.72);color:var(--text);font-size:13px;outline:none}.composer textarea:focus{border-color:rgba(201,157,225,.58)}.preview{display:none;gap:5px;margin-bottom:5px;overflow-x:auto}.preview-item{position:relative;width:58px;height:58px;flex:0 0 auto}.preview-item img{width:100%;height:100%;border-radius:7px;object-fit:cover}.preview-item button{position:absolute;right:-3px;top:-3px;width:18px;height:18px;padding:0;border:0;border-radius:50%;background:#76677e;color:#fff}
.scrim{position:fixed;inset:0;z-index:30;display:none;background:rgba(5,3,10,.55);backdrop-filter:blur(2px)}.scrim.show{display:block}.drawer,.modal,.sheet{position:fixed;z-index:40;border:1px solid var(--line);background:rgba(24,17,38,.97);box-shadow:0 20px 50px rgba(0,0,0,.42);backdrop-filter:blur(18px);transition:transform .22s ease,opacity .22s ease}.drawer{top:0;bottom:0;width:min(84vw,330px);padding:calc(12px + env(safe-area-inset-top)) 13px calc(14px + var(--safe-bottom));overflow-y:auto}.drawer.left{left:0;transform:translateX(-105%)}.drawer.right{right:0;transform:translateX(105%)}.drawer.open{transform:none}.panel-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.panel-head b{font-size:14px;letter-spacing:.12em}.panel-head button{width:34px;height:34px;border:0;background:transparent;color:var(--muted);font-size:24px;cursor:pointer}.room-list{display:flex;flex-direction:column;gap:7px;margin-bottom:12px}.room-item{width:100%;padding:11px;border:1px solid transparent;border-radius:11px;background:rgba(255,255,255,.045);color:var(--text);text-align:left;cursor:pointer}.room-item.active{border-color:rgba(205,165,226,.48);background:rgba(166,109,202,.17)}.room-item b{display:block;font-size:12px}.room-item small{display:block;margin-top:4px;color:var(--muted);font-size:9px}.wide-btn,.memory-tabs a,.memory-tabs button{width:100%;min-height:40px;margin-top:8px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.05);color:var(--text);font-size:11px;cursor:pointer}.wide-btn.primary{background:rgba(166,109,202,.28)}.home-link{display:block;margin-top:18px;color:var(--muted);font-size:11px;text-decoration:none}.drawer>label{display:block;margin:12px 0;color:var(--muted);font-size:10px}.drawer>label input,.search-input,.drawer select,#logDate{display:block;width:100%;height:40px;margin-top:5px;border:1px solid var(--line);border-radius:9px;padding:0 10px;background:#130e20;color:var(--text)}fieldset{margin:14px 0;padding:10px;border:1px solid var(--line);border-radius:10px}legend{padding:0 6px;color:var(--muted);font-size:10px}fieldset label{display:block;padding:5px;font-size:11px}
.modal{left:50%;top:50%;width:min(92vw,560px);max-height:min(78vh,700px);padding:14px;border-radius:16px;opacity:0;pointer-events:none;transform:translate(-50%,-46%) scale(.97)}.modal.open{opacity:1;pointer-events:auto;transform:translate(-50%,-50%) scale(1)}.result-list{max-height:55vh;margin-top:10px;overflow-y:auto;display:flex;flex-direction:column;gap:7px}.result-item,.memory-item{padding:10px;border:1px solid var(--line);border-radius:10px;background:rgba(255,255,255,.04);font-size:11px;line-height:1.65}.result-item small,.memory-item small{display:block;margin-bottom:4px;color:var(--muted);font-size:8px}.panel-empty{padding:30px 10px;text-align:center;color:var(--muted);font-size:11px}.memory-tabs{display:grid;grid-template-columns:1fr 1fr;gap:7px}.memory-tabs a,.memory-tabs button{display:grid;place-items:center;margin:0;text-decoration:none}.sheet{left:10px;right:10px;bottom:calc(8px + var(--safe-bottom));padding:8px;border-radius:15px;opacity:0;pointer-events:none;transform:translateY(115%)}.sheet.open{opacity:1;pointer-events:auto;transform:none}.sheet-item{display:flex;width:100%;min-height:44px;align-items:center;gap:8px;padding:0 12px;border:0;border-bottom:1px solid var(--line);background:transparent;color:var(--text);font-size:12px;text-align:left;cursor:pointer}.sheet-item:last-child{border-bottom:0}
.mention-title{padding:8px 12px 10px;color:var(--muted);font-size:10px}.mention-sheet .sheet-item{min-height:54px}.mention-sheet .sheet-item.active{background:rgba(166,109,202,.17)}.mention-sheet .sheet-item b{display:block;font-size:12px}.mention-sheet .sheet-item small{display:block;margin-top:3px;color:var(--muted);font-size:9px}.mention-avatar{display:grid;place-items:center;width:30px;height:30px;flex:0 0 auto;border-radius:50%;color:#fff;font-size:10px}
@media(max-width:520px){.topbar{height:54px}.messages{padding:12px 10px 18px}.packet{max-width:80%}.bubble{font-size:12.5px}.composerbar{padding-left:9px;padding-right:9px}.mention-btn{min-width:45px;padding:0 6px}.send-btn{min-width:44px;padding:0 12px}.icon-btn{width:34px}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;animation:none!important;transition:none!important}}

/* 客厅提案卡: [propose_summary_add] 触发 */
.propose-card {
  margin-top: 8px;
  padding: 10px 12px;
  background: rgba(255, 240, 200, 0.28);
  border: 1px solid rgba(200, 160, 100, 0.5);
  border-radius: 10px;
  font-size: 13px;
  max-width: 360px;
}
.propose-card.resolved {
  opacity: 0.65;
  background: rgba(200, 200, 200, 0.15);
}
.propose-title {
  font-weight: 600;
  color: #8a6a3a;
  margin-bottom: 4px;
  font-size: 12px;
}
.propose-body {
  color: #4a3820;
  line-height: 1.5;
  margin-bottom: 8px;
  white-space: pre-wrap;
}
.propose-actions {
  display: flex;
  gap: 8px;
}
.propose-btn {
  padding: 4px 12px;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  font-size: 12px;
}
.propose-btn.yes {
  background: #b58a4a;
  color: white;
}
.propose-btn.yes:disabled { opacity: 0.5; cursor: default; }
.propose-btn.no {
  background: rgba(0,0,0,0.08);
  color: #6a5a40;
}
.propose-btn.no:disabled { opacity: 0.5; cursor: default; }
.propose-done {
  font-size: 12px;
  color: #6a5a40;
}
