:root{font-family:"PingFang SC","Microsoft YaHei",system-ui,sans-serif;color:#18352e;background:#eff3f0;font-size:16px;color-scheme:light}*{box-sizing:border-box}[hidden]{display:none!important}body{margin:0}h1,h2,p{margin:0}button,input,textarea{font:inherit}button{cursor:pointer}button:disabled{opacity:.55;cursor:default}button:focus-visible,input:focus-visible,textarea:focus-visible{outline:2px solid #167550;outline-offset:2px}button,input,textarea{border-radius:9px}button{font-weight:600}.guest,.desk{height:100vh;height:100dvh}.chat-frame,.desk-shell{height:100%;margin:auto;display:flex;flex-direction:column;background:#fafbf8}.chat-frame{max-width:740px;border-inline:1px solid #dbe4dc}.brand-bar{display:flex;align-items:center;gap:10px;padding:15px 23px;border-bottom:1px solid #d6e0d8;background:#fff;flex:none}.brand-line{font-size:12px;line-height:1.45;font-weight:650;color:#536c63}.brand-bar h1{font-size:20px;letter-spacing:.01em;line-height:1.4}.brand-bar>button{margin-left:auto}.text-button{background:transparent;color:#25634c;border:0;padding:10px 5px;font-size:14px}.chat-scroll{overflow:auto;min-height:0;flex:1;overscroll-behavior:contain;padding:24px}.welcome{padding:13px 0 24px}.welcome-rule{width:32px;height:3px;background:#478366;margin-bottom:13px}.welcome h2{font-size:clamp(24px,5vw,30px);letter-spacing:-.04em}.welcome p{color:#435d52;line-height:1.65;margin-top:9px}.welcome .return-hint{font-size:13px;color:#607368;margin-top:10px}.msg{margin:0 0 15px;display:flex;flex-direction:column;align-items:flex-start}.msg.mine{align-items:flex-end}.meta{font-size:12px;color:#5a6d66;margin:0 2px 4px}.bubble{max-width:85%;border-radius:12px 12px 12px 3px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.55;padding:10px 14px;border:1px solid #dbe3dd;background:white}.mine .bubble{background:#deeee1;border-color:#cddecf;border-radius:12px 12px 3px 12px}.composer{background:#fff;border-top:1px solid #dae4dd;padding:12px 18px;padding-bottom:max(12px,env(safe-area-inset-bottom));flex:none}.status{font-size:13px;line-height:1.5;color:#98431e}.status:not(:empty){margin-bottom:8px}.send-row{display:flex;align-items:stretch;gap:9px}textarea,input{border:1px solid #b6c8bb;background:white;color:#17392b;padding:10px 12px;min-width:0}textarea{resize:none;line-height:1.45;flex:1;max-height:130px}textarea::placeholder{color:#6c7c72}.primary,.secondary{padding:10px 16px;border:1px solid transparent;min-height:42px}.primary{color:white;background:#216247}.primary:hover{background:#164f38}.secondary{color:#285640;background:#fff;border-color:#c1d0c5}.actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.sr{position:absolute;width:1px;height:1px;clip-path:inset(50%);overflow:hidden}.desk-shell{background:#f8faf7}.desk-grid{display:grid;grid-template-columns:minmax(230px,32%) 1fr;min-height:0;flex:1}.desk-grid aside{background:white;border-right:1px solid #dae2db;overflow:auto}.list-header,.detail-head{display:flex;align-items:center;justify-content:space-between;padding:15px 20px;border-bottom:1px solid #dbe3dd;background:#fff}.list-header h2,.detail-head h2{font-size:17px}.list-header span,.detail-head p{font-size:13px;color:#566d60}.thread{width:100%;display:block;text-align:left;border:0;border-bottom:1px solid #e2e9e3;background:white;padding:14px 20px;border-radius:0;color:inherit}.thread.active{background:#e5f0e7}.thread strong{font-size:15px}.thread p{font-size:13px;line-height:1.6;color:#58685e;font-weight:400;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.badge{float:right;background:#246349;color:white;border-radius:8px;padding:1px 6px;font-size:12px}.desk-convo,#detail{min-height:0;height:100%;display:flex;flex-direction:column}.empty,.login-shell{display:grid;place-items:center;height:100%;color:#5a6d60}.login-shell{padding:18px}.login-card,dialog{background:#fff;color:#19392c;padding:30px;border:1px solid #d4dfd6;border-radius:14px;width:min(100%,390px)}.login-card img{display:block;margin-bottom:12px}.login-card h1{font-size:26px;margin-bottom:22px}.login-card input,dialog input{width:100%;margin:5px 0 14px}.login-card label,dialog label{display:block;font-size:14px;font-weight:600}.login-card button{width:100%}dialog{width:min(calc(100% - 32px),390px)}dialog::backdrop{background:#132b2066}dialog h2{font-size:20px}dialog p{margin:9px 0 17px;line-height:1.55;color:#526a5c}#more{margin:12px 20px}#back{display:none}.desk .chat-scroll{padding:20px}.desk .brand-bar{padding-block:12px}
@media(max-width:640px){.brand-bar{padding:12px 15px}.chat-frame{border:0}.chat-scroll{padding:15px 16px}.composer{padding-inline:12px}.desk-grid{display:block}.desk-grid aside,.desk-convo{height:100%}.desk-convo{display:none}.focused .desk-convo{display:flex}.focused aside{display:none}.detail-head{justify-content:flex-start;gap:15px}#back{display:inline-block}.desk .chat-scroll{padding:15px}}
.phone-link{color:#205e44;font-weight:650;text-decoration:underline;text-underline-offset:.2em;white-space:nowrap}
.phone-link:focus-visible{outline:2px solid #167550;outline-offset:3px}
.hotline{display:inline-flex;align-items:center;min-height:44px;padding:0 12px;border:1px solid #bfd0c3;border-radius:8px;background:#fff}
.guest .send-row{align-items:flex-end}
.guest .send-row textarea{
  --input-min:calc(7.5em + 22px);
  line-height:1.5;
  min-height:var(--input-min);
  max-height:20rem;
  max-height:clamp(var(--input-min),34dvh,20rem);
}
.guest .send-row .primary{min-width:68px;min-height:44px}
@media(max-width:640px),(max-height:500px){
  .guest .send-row textarea{--input-min:calc(4.5em + 22px)}
  .guest .send-row .primary{min-width:56px}
}
.desk-grid{grid-template-rows:minmax(0,1fr)}
.desk-convo{min-width:0}
.desk .send-row{align-items:flex-end}
.desk .send-row textarea{min-height:100px;max-height:240px;max-height:clamp(100px,32dvh,240px);line-height:1.55}
.desk .send-row .primary{min-width:76px;min-height:46px}
@media(max-width:640px),(max-height:500px){
  .desk .send-row textarea{min-height:76px;max-height:clamp(76px,32dvh,180px)}
  .desk .send-row .primary{min-width:60px}
}
.media-tools{display:flex;gap:8px;margin-bottom:7px}.media-action{display:inline-flex;align-items:center;gap:6px;min-height:36px;padding:5px 13px;border:1px solid #c8d7cc;background:#f6f9f6;color:#285b47;font-size:14px}.media-action svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.media-bubble{max-width:min(85%,360px);padding:5px 5px 0;border:1px solid #d0dcd2;background:white;border-radius:10px}.media-bubble img,.media-bubble video{display:block;width:auto;max-width:100%;height:auto;max-height:300px;border-radius:6px;object-fit:contain}.media-bubble video{background:#15251d}.media-save{display:inline-block;padding:7px 5px;color:#265f46;font-size:13px}.media-bubble a:focus-visible{outline:2px solid #25734f}.media-bubble>a:first-child{display:block}#uploadName{overflow-wrap:anywhere}#uploadStatus{min-height:1.45em}
.doc-download{display:block;color:#225e46;padding:9px 12px 2px;font-weight:650;overflow-wrap:anywhere}.doc-download+span{display:block;padding:2px 12px 9px;font-size:13px;color:#536c60}
.requests{padding:6px 14px;border-bottom:1px solid #d4e1d7;background:#f2f7f2;max-height:145px;overflow:auto}.requests p{overflow-wrap:anywhere;margin:3px 0}.requests button{margin:3px 6px 3px 0}.requests .secondary,.requests .primary{min-height:32px;padding:5px 12px;font-size:14px}.requests .text-button{display:block;text-align:left;overflow-wrap:anywhere}
#uploadDialog .upload-rule{font-size:13px;color:#546b5d}.alert-row{padding:10px 0;border-bottom:1px solid #dde5df;line-height:1.6}#alertList{max-height:48vh;overflow:auto}


/* Mobile Desk Responsive Fix (2026-12-03) */
.detail-head > div { min-width: 0; flex: 1; }
#pushPkgSelect { max-width: 100%; min-width: 0; }
#back { white-space: nowrap; flex-shrink: 0; }
@media (max-width: 640px) {
  .desk .brand-bar { padding: 8px 12px; gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
  .desk .brand-bar img { width: 28px; height: 28px; flex-shrink: 0; }
  .desk .brand-line { display: none; }
  .desk .brand-bar h1 { font-size: 15px; white-space: nowrap; }
  .desk .brand-bar button { padding: 5px 8px; font-size: 12px; min-height: 30px; white-space: nowrap; }
  #meBadge { font-size: 11px !important; padding: 3px 7px !important; white-space: nowrap; flex-shrink: 0; }
  .detail-head { flex-direction: column; align-items: stretch; gap: 8px; padding: 10px 12px; max-width: 100vw; overflow-x: hidden; }
  #back {
    display: inline-flex; align-items: center; justify-content: center; gap: 4px;
    align-self: flex-start;
    padding: 6px 12px; min-height: 34px;
    background: #eaf3ed; color: #165b3d; border: 1px solid #c6dfd0; border-radius: 8px;
    font-size: 13.5px; font-weight: 700;
  }
  #back::before { content: "← "; }
  #deviceMetaBar { max-width: 100%; gap: 6px !important; }
  #pushPkgSelect { width: 100%; max-width: 100%; font-size: 12.5px; }
  #deviceMetaBar button { font-size: 12px !important; padding: 4px 8px !important; min-height: 30px !important; height: auto !important; }
  #assignBar { gap: 6px !important; }
  #assignBar button, #assignBar select { min-height: 28px; }
}
