
.support-dialog { width:min(640px,calc(100% - 28px)); max-width:none; max-height:88dvh; height:min(650px,88dvh); border:1px solid #dbe6ec; border-radius:14px; padding:0; overflow:hidden; background:#fff; }
.support-dialog[open] { display:flex; flex-direction:column; }
.support-head { display:flex; align-items:center; gap:10px; min-height:72px; padding:12px 18px; border-bottom:1px solid #dce6ec; }
.support-head > div { flex:1; min-width:0; }
.support-head h2 { font-size:20px; margin:0; overflow-wrap:anywhere; }
.support-context { margin:2px 0 0; color:#4c6375; font-size:12px; overflow-wrap:anywhere; }
.support-context:empty { display:none; }
.support-close { width:44px; min-width:44px; min-height:44px; padding:0; font-size:22px; }
.support-back { min-height:44px; padding-inline:9px; }
.support-inbox { min-height:0; overflow:auto; padding:14px 18px; }
.support-inbox label { display:block; color:#3e566c; font-size:13px; margin-bottom:5px; }
#support-search,#support-message { width:100%; border:1px solid #c7d7e2; border-radius:8px; color:#172e43; padding:9px 11px; font:16px/1.45 var(--font); }
#support-search { min-height:44px; }
.support-inbox-list { display:grid; gap:7px; margin:13px 0; }
.support-thread { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:3px 10px; align-items:center; width:100%; padding:10px 13px; text-align:left; background:#f7fafb; border:1px solid #dfe8ee; border-radius:8px; }
.support-start { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:8px 14px; padding:12px; border:1px solid #dce7ee; border-radius:9px; background:#f7fafc; }
.support-start strong { display:block; color:#173954; font-size:14px; overflow-wrap:anywhere; }
.support-start p { margin:3px 0 0; color:#4c6375; font-size:13px; overflow-wrap:anywhere; }
.support-start .button { min-height:44px; white-space:nowrap; }
.support-start .support-start-status { grid-column:1 / -1; color:#843518; }
.support-start-status:empty { display:none; }
.support-thread:hover { background:#edf4f8; }
.support-thread strong,.support-thread span { min-width:0; overflow-wrap:anywhere; }
.support-thread strong { font-size:14px; }
.support-thread span { grid-column:1; font-size:12px; color:#4c6375; }
.support-thread small { grid-column:2; grid-row:1 / 3; font-size:12px; color:#254f70; }
.support-thread small.viewing { color:#20653d; }
.support-conversation { display:flex; flex-direction:column; flex:1; min-height:0; }
.support-history { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:16px 18px; background:#f6f9fa; }
.support-history:focus-visible { outline:2px solid #83a5bd; outline-offset:-3px; }
.support-empty { color:#4c6375; font-size:14px; margin:10px 0 0; }
.support-empty:empty,.support-status:empty { display:none; }
.support-messages { display:grid; gap:10px; margin:9px 0 0; list-style:none; padding:0; }
.support-message { justify-self:start; min-width:0; max-width:min(85%,450px); padding:7px 11px; border:1px solid #dce7ee; border-radius:3px 11px 11px; background:#fff; overflow-wrap:anywhere; }
.support-message.own { justify-self:end; border-radius:11px 3px 11px 11px; background:#e9f2f7; }
.support-message small { font-size:11px; color:#50697a; }
.support-message p { font-size:14px; line-height:1.5; margin:2px 0 0; white-space:pre-wrap; }
.support-message a { display:block; font-size:13px; color:#164e76; text-decoration:underline; margin-top:5px; }
.support-message img { display:block; max-width:100%; max-height:210px; object-fit:contain; border-radius:6px; margin-bottom:3px; }
.support-compose { padding:11px 18px max(13px,env(safe-area-inset-bottom)); border-top:1px solid #dce6ec; }
#support-message { resize:vertical; min-height:64px; max-height:24dvh; display:block; }
.support-compose-actions { display:grid; grid-template-columns:44px minmax(0,1fr) auto; align-items:end; gap:8px; }
.support-compose-actions .button { min-height:44px; }
.support-compose-actions .support-attach { width:44px; padding:0; border-radius:10px; display:grid; place-items:center; color:#20577b; background:#f4f8fa; }
.support-compose-actions .support-attach:hover { background:#eaf2f7; }
.support-audience { margin:0; padding:9px 18px; border-bottom:1px solid #dce6ec; color:#4c6375; font-size:13px; }
.support-status { color:#843518; margin:7px 0 0; font-size:13px; }
.support-attached { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:5px 8px; margin-bottom:6px; border:1px solid #dce6ec; border-radius:7px; background:#f7fafb; }
.support-attached span { min-width:0; font-size:13px; overflow-wrap:anywhere; }
.support-attached button { padding-inline:8px; }
.support-inbox-badge { background:#bc4b18; color:#fff; border-radius:12px; font-size:10px; padding:2px 6px; margin-left:5px; }
@media (max-width:580px) {
  .support-dialog { width:calc(100% - 12px); height:92dvh; max-height:92dvh; }
  .support-head { min-height:62px; padding:8px 10px; }
  .support-head h2 { font-size:17px; }
  .support-context { font-size:11px; }
  .support-inbox,.support-history,.support-compose,.support-audience { padding-inline:10px; }
  .support-thread { gap:3px 8px; padding:8px; }
}

.support-launcher { position:fixed; z-index:700; right:max(15px,env(safe-area-inset-right)); bottom:max(16px,env(safe-area-inset-bottom)); display:grid; place-items:center; width:54px; height:54px; padding:0; color:#fff; background:#173954; border:2px solid #fff; border-radius:50%; box-shadow:0 4px 16px #16354f50; }
.support-launcher:hover { background:#22547a; }
.support-launcher:focus-visible { outline:3px solid #d96925; outline-offset:3px; }
.support-launcher-badge { position:absolute; width:12px; height:12px; top:0; right:0; border-radius:50%; background:#ee843b; border:2px solid #fff; }
.support-launcher[hidden],.support-launcher-badge[hidden] { display:none; }
@media print { .support-launcher { display:none; } }
