
html:has(.fs-support-screen) { overflow: hidden; overscroll-behavior: none; }
body.fs-support-screen {
  position: fixed; inset: var(--chat-top, 0px) 0 auto;
  height: 100vh; height: var(--chat-height, 100dvh);
  display: flex; flex-direction: column; overflow: hidden;
}
.fs-support-screen > .topbar { flex: none; }
.fs-support-screen > main.wrap {
  flex: 1; min-height: 0; display: flex; flex-direction: column;
  width: min(1170px, 96%); margin: 0 auto; padding: clamp(6px, 1.5vh, 18px) 0;
}
.fs-support-screen > .footer { display: none; }
.fs-support-screen .support-page, .fs-support-frame .support-page {
  display: flex; flex: 1; min-width: 0; min-height: 0; width: 100%;
  max-width: none; margin: 0; padding: 0; gap: 12px;
}
.support-chat-column, .support-chat-column > .support-window {
  display: flex; flex: 1; flex-direction: column; min-height: 0; min-width: 0;
}
.support-chat-column > .support-recovery {
  flex: 0 1 auto; min-height: 0; max-height: 32%; overflow: auto;
  margin: 0 0 4px; padding: 4px 12px; overscroll-behavior: contain;
}
.support-chat-column .support-top { flex: none; gap: 8px; padding: 6px 14px; }
.support-chat-column .support-top h1 { margin: 0; font-size: 1rem; line-height: 1.5; }
.support-chat-column .support-back { margin-inline-start: auto; }
.support-chat-column .support-avatar { height: 34px; width: 34px; border-radius: 10px; }
.support-chat-column .support-messages {
  flex: 1 1 0; min-height: 0; max-height: none; overflow-y: auto;
  overscroll-behavior: contain; overflow-anchor: none;
}
.support-chat-column .support-bubble { flex: none; min-width: 0; }
.support-chat-column .support-form {
  flex: 0 1 auto; min-height: 0; max-height: 55%; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px 12px max(8px, env(safe-area-inset-bottom));
}

.support-chat-column .support-form textarea {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  height: auto;
  min-height: calc(1.5em + 1rem + 2px);
  max-height: min(7.5rem, 24vh);
  padding: .5rem .75rem;
  font-size: 16px;
  line-height: 1.5;
  text-align: start;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  overflow-x: hidden;
  overflow-y: auto;
  field-sizing: content;
  resize: none;
}
.support-chat-column .support-tools { margin-top: 6px; }
.support-chat-column .support-status:empty { display: none; }

.support-inbox {
  --inbox-bg: #fff; --inbox-edge: #e5ddce; --inbox-current: #fff2d5;
  position: relative; display: flex; flex-direction: column; gap: 8px;
  flex: 0 0 clamp(205px, 24%, 300px); min-height: 0; min-width: 0;
  padding: 10px; background: var(--inbox-bg); border: 1px solid var(--inbox-edge); border-radius: 16px;
}
html[data-theme="dark"] .support-inbox { --inbox-bg: #1b1c1d; --inbox-edge: #44433f; --inbox-current: #483821; }
.thread-picker { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
.thread-picker summary { cursor: pointer; padding: 6px; font-size: .9rem; font-weight: 700; }
.thread-picker summary span { font-size: .8em; margin-inline-start: .3em; }
.thread-list { display: grid; gap: 3px; }
.thread-list a { padding: 8px; border-radius: 8px; border-inline-start: 3px solid transparent; color: inherit; }
.thread-list a[aria-current] { border-color: #eba000; background: var(--inbox-current); }
.thread-list a:hover { background: var(--inbox-current); }
.thread-list strong, .thread-list small { display: block; overflow-wrap: anywhere; }
.thread-list strong { font-size: .85rem; }
.thread-list small { font-size: .72rem; }
.new-thread { margin: 0; }
.new-thread button { border: 0; border-radius: 9px; min-height: 40px; width: 100%; padding: 5px 10px; color: #151515; background: #f4a308; font: inherit; font-size: .85rem; font-weight: 700; }
@media (max-width: 720px) {
  .fs-support-screen > main.wrap { width: 100%; padding: 2px 4px; }
  .fs-support-screen .support-page, .fs-support-frame .support-page { flex-direction: column; gap: 4px; }
  .support-inbox { flex: none; flex-direction: row; align-items: center; padding: 4px 8px; border-radius: 10px; }
  .thread-picker { overflow: visible; }
  .thread-list {
    position: absolute; z-index: 10; top: 100%; inset-inline: 0; padding: 5px;
    max-height: min(48vh, 19rem); max-height: min(48dvh, 19rem); overflow-y: auto; overscroll-behavior: contain;
    background: var(--inbox-bg); border: 1px solid var(--inbox-edge); border-radius: 10px; box-shadow: 0 8px 16px #0002;
  }
  .fs-support-screen .support-tools { padding-inline-end: 58px; }
  .fs-support-screen .support-top { padding-block: 3px; }
}
@media (max-height: 540px) {
  .fs-support-screen > .topbar .searchbox, .fs-support-screen > .topbar .store-menu-bar { display: none; }
  .fs-support-screen > .topbar .top-inner { min-height: 40px; padding-block: 2px; }
  .support-chat-column .support-note { display: none; }
  .support-chat-column .support-form textarea {
    padding-block: .25rem;
    min-height: calc(1.5em + .5rem + 2px);
  }
}
.fs-support-screen.chat-compact > .topbar { display: none; }
.fs-support-screen.chat-compact .support-note { display: none; }

.fs-support-screen .compact-back { display: none; }
.fs-support-screen.chat-compact .compact-back { display: inline-block; }
.support-topic { min-width: 0; }
.support-topic small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .75rem; }
.custom-decision { display: flex; flex-wrap: wrap; gap: .5rem; padding-block: .6rem; }
.custom-decision label { flex: 1 0 100%; font-size: .85rem; }
.custom-decision textarea { display: block; width: 100%; box-sizing: border-box; margin-block: .25rem; padding: .4rem; border: 1px solid #918775; border-radius: .5rem; color: inherit; background: transparent; font: inherit; }
.inbox-filters { display: flex; flex-wrap: wrap; gap: .3rem; margin: 0; padding: .3rem 0; border: 0; }
.inbox-filters label { position: relative; font: inherit; font-size: .76rem; padding: .28rem .4rem; border: 1px solid var(--inbox-edge); border-radius: .4rem; cursor: pointer; }
.inbox-filters input { position: absolute; opacity: 0; width: 1px; }
.inbox-filters label:has(:checked) { background: var(--inbox-current); font-weight: bold; }
.inbox-filters label:focus-within { outline: 2px solid currentColor; }
.thread-rows { display: grid; gap: 3px; }
.thread-list:has([value="read"]:checked) [data-unread="yes"],
.thread-list:has([value="unread"]:checked) [data-unread="no"],
.inbox-filter-empty { display: none; }
.thread-list:has([value="read"]:checked):not(:has([data-unread="no"])) .inbox-filter-empty,
.thread-list:has([value="unread"]:checked):not(:has([data-unread="yes"])) .inbox-filter-empty { display: block; font-size: .8rem; }
.unread-badge { font-size: .73rem; font-weight: bold; }
