/* FOX responsive foundation. Loaded after the preserved V1–V10 theme. */
html, body { width: 100%; height: 100%; overflow: hidden; }
body { margin: 0; }
#mountPoint { box-sizing: border-box; height: var(--fox-viewport-height, 100dvh) !important; padding: 16px !important; }
#app-container { width: 100% !important; max-width: 1600px !important; height: 100% !important; min-height: 0 !important; border-radius: 20px !important; }
#sidepanel { width: 340px !important; min-width: 280px; flex-shrink: 0; }
#topic-view { min-width: 0; flex: 1; }
#info-view { min-width: 260px; max-width: 340px; }
#messages-container, #messages-panel, .scrollable-panel { min-height: 0; overscroll-behavior: contain; }
#send-message-panel { flex-shrink: 0; }
#send-message-input { overflow-wrap: anywhere; max-height: min(180px, 30dvh); overflow-y: auto; }
input, textarea, [contenteditable=true] { -webkit-user-select: text; user-select: text; }
button:disabled { opacity: .5; cursor: wait; }
a:focus-visible, button:focus-visible, input:focus-visible, [tabindex]:focus-visible { outline: 2px solid #ff874c !important; outline-offset: 3px; }
#login-form { width: 100%; max-width: 400px; margin-inline: auto; }
#login-form input { min-height: 48px; }
#login-form .panel-form-row { flex-wrap: wrap; gap: 8px; }
#login-form button[type=submit] { min-height: 48px; width: 100%; }
@media (max-width: 960px) and (min-width: 641px) {
  #mountPoint { padding: 0 !important; }
  #app-container { border-radius: 0 !important; }
  #sidepanel { width: 290px !important; min-width: 240px; }
  #info-view { position: absolute; right: 0; width: 320px; max-width: 100%; z-index: 30; }
}
@media (max-width: 640px) {
  #mountPoint { padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left) !important; }
  #app-container { border-radius: 0 !important; box-shadow: none !important; }
  #sidepanel, #topic-view, #info-view { width: 100% !important; min-width: 0 !important; max-width: none !important; height: 100% !important; flex: 1 1 100%; }
  #side-caption-panel, #topic-caption-panel { min-height: 60px !important; height: auto !important; flex-shrink: 0; }
  #send-message-panel { padding-bottom: 8px !important; }
  input:not([type=checkbox]):not([type=radio]), textarea, #send-message-input { font-size: 16px !important; }
  #login-form { padding-inline: 8px; }
  #login-form .panel-form-row a { margin-left: 0; }
  .fox-v9-tabs { flex-wrap: wrap; }
  .fox-v9-tabs > a { min-height: 44px; }
  .bubble { max-width: 86vw !important; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
/* Authentication has its own hierarchy, separate from the chat navigation. */
#sidepanel:has(#login-form) { overflow-y: auto; }
#login-form { padding: 28px 20px; }
.fox-login-intro { margin-bottom: 28px; }
.fox-login-intro h1 { color: #f4f6f8; font-size: 25px; line-height: 1.2; letter-spacing: -.6px; margin: 0 0 12px; }
.fox-login-intro p { color: #9aa8b7; font-size: 14px; line-height: 1.5; }
#login-form input:not([type=checkbox]) { background: #19212b !important; border: 1px solid #34404d !important; border-radius: 12px !important; color: #f4f6f8 !important; padding: 12px !important; margin-bottom: 12px; }
#login-form input::placeholder { color: #a4afbd !important; opacity: 1; }
#login-form .group-focus input { padding-right: 44px !important; }
#login-form .panel-form-row { color: #c8d0db; font-size: 13px; line-height: 1.6; margin-block: 8px 24px; }
.fox-emoji-picker { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 10px; background: #19212b; border-top: 1px solid #34404d; }
.fox-emoji-picker button, .fox-emoji-toggle { min-width: 36px; min-height: 44px; border: 0; border-radius: 10px; background: transparent; color: #b8c6d6; font-size: 24px; cursor: pointer; padding: 0; }
.fox-emoji-picker button:hover, .fox-emoji-toggle:hover { background: #2b3949; }
@media (max-width: 640px) { .fox-emoji-picker { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
#dummy-view.fox-welcome { display: flex !important; flex: 1; min-width: 0; align-items: center; justify-content: center; background: radial-gradient(ellipse at 65% 25%, #28313c 0, #121921 60%) !important; }
.fox-welcome-content { display: block !important; text-align: center; padding: 32px; max-width: 620px; }
.fox-welcome-mark { display: grid; place-items: center; margin: 0 auto 32px; width: 80px; height: 80px; border-radius: 25px; background: #ff752f; color: white; font-size: 40px; font-weight: 800; box-shadow: 0 16px 70px #ff752f22; }
.fox-welcome h1 { font-size: clamp(25px, 3vw, 40px); line-height: 1.2; letter-spacing: -1px; color: #f4f6f8; }
.fox-welcome p { color: #a3afbf; font-size: 16px; line-height: 1.6; }
.fox-welcome span { display: block; margin-top: 60px; color: #738293; font-size: 12px; letter-spacing: 2px; }
#send-message-wrapper.fox-v5-composer { display: flex !important; flex-direction: column !important; align-items: stretch !important; flex-shrink: 0 !important; width: 100%; height: auto !important; max-height: none !important; padding: 6px !important; }
#send-message-panel.fox-v5-composer-panel { display: flex !important; width: 100% !important; gap: 4px !important; padding: 4px !important; }
#send-message-input.fox-v5-message-input { flex: 1 1 0 !important; min-width: 0 !important; width: 0 !important; }
#send-message-wrapper > .fox-emoji-picker { display: grid !important; flex: none !important; width: 100%; max-height: 200px; overflow-y: auto; }
#send-message-panel > a { display: inline-flex; align-items: center; justify-content: center; min-width: 32px; min-height: 44px; flex-shrink: 0; }
.fox-profile .panel-form-column { padding: 20px !important; }
.fox-profile .panel-form-column > a.flat-button { display: flex; align-items: center; min-height: 48px; padding: 10px 12px; margin-block: 4px; border-radius: 12px; background: #19212b; color: #d9e1ec; text-transform: none; }
.fox-profile .panel-form-column > a.flat-button:hover { background: #253140; }
.fox-profile label.small { color: #95a5b8 !important; }
.fox-profile .group { margin-top: 12px; }
#side-caption-panel .fox-v3-sidebar-actions a { background: #19212b !important; color: #d9e1ec !important; }
