#settingsOverlay #typographySettings { margin-bottom: 20px; padding: 22px; }
#typographySettings .typography-heading { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; }
#typographySettings h3 { margin:0 0 7px; font-size:18px; }
#typographySettings .typography-heading p { margin:0; font-size:13px; line-height:1.5; color:var(--settings-muted, #9fadc4); }
#typographySettings .typography-controls { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin-top:20px; }
#typographySettings .typography-field { display:flex; min-width:0; flex-direction:column; gap:10px; font-size:13px; line-height:1.5; }
#typographySettings .typography-field > span { font-weight:600; }
#typographySettings output { margin-left:8px; white-space:nowrap; }
#typographySettings input[type="range"] { width:100%; min-width:0; min-height:36px; margin:0; accent-color:var(--skin-accent,var(--green,#66e36a)); }
#typographySettings .typography-field small { font-size:11px; color:var(--settings-muted,#9fadc4); }
#settingsOverlay #typographySettings .settings-select { width:100%; height:auto; min-height:42px; white-space:normal; }
#typographySettings .typography-preview { margin-top:20px; padding:18px; border:1px solid var(--settings-line,var(--line,#2b4056)); border-radius:8px; background:var(--skin-deep,#07121e); overflow-wrap:anywhere; }
#typographySettings .typography-preview > strong { display:block; margin-bottom:14px; font-size:12px; opacity:.8; }
#typographySettings .typography-preview > div { display:flex; align-items:baseline; flex-wrap:wrap; gap:12px; }
#typographySettings .typography-preview b { font-size:14px; }
#typographySettings .typography-preview small { font-size:11px; opacity:.7; }
#typographySettings .typography-message-preview { margin:10px 0 0; font-size:14px; line-height:1.55; }
body[data-message-font-size] #typographySettings .typography-message-preview,
body[data-message-font-size] #messagesView .dm-bubble p,
body[data-message-font-size] #messageList .message-content > p,
body[data-message-font-size] #messageInput,
body[data-message-font-size] #dmInput { font-size:var(--hv-message-size) !important; line-height:1.55; }
body[data-large-text] #settingsOverlay .settings-nav-item { height:auto; min-height:40px; }
body[data-large-text] #settingsOverlay .settings-nav-item b { white-space:normal; }
body[data-large-text] #settingsOverlay .settings-select,
body[data-large-text] #settingsOverlay .settings-input { height:auto; min-height:42px; }
body[data-large-text] :is(.message-form,.dm-form) input { height:auto; min-height:42px; }
#messageList .message-meta { flex-wrap:wrap; row-gap:4px; overflow-wrap:anywhere; }
#messageList .message-content > p { overflow-wrap:anywhere; }
@media(min-width:768px) {
  body[data-large-text] { --shell-rail:clamp(224px,calc(224px * var(--hv-text-scale)),288px) !important; }
  body.sidebar-collapsed[data-large-text] { --shell-rail:88px !important; }
  body[data-large-text] .app-sidebar.rail { overflow-y:auto !important; }
  body[data-large-text] .app-sidebar .rail-item b { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
  body[data-large-text] .app-sidebar .profile-chip { min-height:calc(100px * var(--hv-text-scale)); }
  body[data-large-text] #settingsOverlay .settings-shell { grid-template-columns:clamp(236px,calc(236px * var(--hv-text-scale)),320px) minmax(0,1fr); }
  body[data-large-text] #settingsOverlay .settings-nav-group { min-height:0; overflow-y:auto; }
  body.home-view-active[data-large-text] #nowView {
    overflow-y:auto !important;
    grid-template-rows:calc(260px * var(--hv-text-scale)) minmax(calc(80px * var(--hv-text-scale)),max-content) minmax(calc(250px * var(--hv-text-scale)),max-content) minmax(calc(200px * var(--hv-text-scale)),max-content) !important;
    align-content:start;
  }
  body.home-view-active[data-large-text] #nowView .approved-home-hero { min-height:0 !important; height:100% !important; }
  body.home-view-active[data-large-text] #nowView .approved-home-copy { position:relative !important; inset:auto !important; width:100% !important; height:auto !important; min-width:0; box-sizing:border-box; }
  body.home-view-active[data-large-text] #nowView .approved-home-copy h1 { overflow-wrap:anywhere; }
  body.home-view-active[data-large-text] #nowView .approved-home-copy p { white-space:normal !important; max-width:100%; }
  body.home-view-active[data-large-text] #nowView .now-actions { flex-wrap:wrap !important; }
  body.home-view-active[data-large-text] #nowView .now-actions > button { min-height:calc(44px * var(--hv-text-scale)); height:auto !important; }
  body.home-view-active[data-large-text] #nowView .approved-panel > header { flex-wrap:wrap; gap:8px; min-height:calc(38px * var(--hv-text-scale)); height:auto !important; padding-block:8px; }
  body.home-view-active[data-large-text] #nowView .approved-panel > header h2 { white-space:normal; line-height:1.25; }
  body.home-view-active[data-large-text] #nowView .approved-news-row { min-height:calc(78px * var(--hv-text-scale)); height:auto !important; }
}
@media(max-width:850px) { #typographySettings .typography-controls { grid-template-columns:1fr; } }

@media(min-width:1024px) and (max-width:1279px) {
  body[data-large-text]:not(.sidebar-collapsed) { --shell-rail:clamp(184px,calc(184px * var(--hv-text-scale)),232px) !important; }
}
@media(min-width:768px) and (max-width:1023px) {
  body[data-large-text] { --shell-rail:80px !important; }
  body[data-large-text] .app-sidebar .profile-chip { min-height:174px; }
}

.bot-module-menu { display:flex; flex-wrap:wrap; gap:.55rem; margin:0 0 1rem; }
.bot-module-menu > button { display:grid; gap:.2rem; white-space:normal; }
.bot-module-menu small { color:var(--muted); }
.bot-module-menu [data-bot-status]:empty { display:none; }
