/* R38 manual polish. Scoped to manual reading surfaces. */
.r38-warp-hub .warp-screen-frame{max-width:calc(72vh * .5625 + 40px)}.r38-warp-hub .warp-screen-frame .screen{aspect-ratio:auto}.r38-warp-hub video{max-height:72vh;object-fit:contain!important}.r38-warp-hub video::cue{font-family:'IBM Plex Sans Thai',sans-serif}
.r38-download{margin:12px 0 24px;display:flex;gap:12px;flex-wrap:wrap}.r38-download a{display:inline-block;padding:12px 20px;border:1px solid #c8a24a;border-radius:9px;background:#f7f1e3;color:#0a0807!important;font-weight:600;text-decoration:none}.r38-download a:hover,.r38-download a:focus-visible{outline:2px solid #c8a24a;outline-offset:3px}.r38-callout{padding:20px 24px;margin:24px 0;background:#f7f1e3;color:#0a0807;border:1px solid #d8c596;border-left:4px solid #c8a24a;border-radius:8px;line-height:1.8}.r38-callout strong{color:#715820}.r38-callout p{color:#0a0807!important;margin:6px 0}.r38-check{background:#f1f5ec;border-color:#b9c6a7}.r38-steps{display:grid;gap:18px;margin:24px 0}.r38-step{display:flex;gap:16px;padding:20px;background:#f7f1e3;color:#0a0807;border-radius:10px;border:1px solid #d8c596}.r38-step h3{margin:0 0 8px;color:#0a0807!important;font-size:1.15rem}.r38-step p{margin:0;color:#39352d!important;line-height:1.9}.r38-badge{flex:0 0 32px;height:32px;text-align:center;line-height:32px;border-radius:50%;color:#f7f1e3;background:#0a0807;font-family:'JetBrains Mono',monospace}.r38-reference{margin:24px 0}.r38-reference img{display:block;width:100%;height:auto;max-width:1080px;border:1px solid #c8a24a;border-radius:8px}.r38-reference figcaption,.r38-media-note{font-size:.95rem;line-height:1.8;margin:12px 0;color:inherit}.r38-media-note{border-left:3px solid #c8a24a;padding-left:16px}.r38-small{font-size:.9rem}.scb-manual video,.bomai video,body:has(a[href*="ThaiLLM_Pro_Easy_R32_DRAFT.pdf"]) video{display:block!important;width:auto!important;max-width:100%!important;max-height:72vh!important;height:auto!important;object-fit:contain;margin:0 auto;background:#0a0807}.scb-manual video::cue,.bomai video::cue{font-family:'IBM Plex Sans Thai',sans-serif;background:rgba(10,8,7,.88);color:#f7f1e3}.scb-manual img[src*="_hero"],.scb-manual img[src*="/heroes/"]{max-height:260px;width:auto;max-width:100%;object-fit:contain;display:block;margin:22px auto}.scb-kind-supplement .chapter-main>img{max-height:260px;object-fit:contain}.scb-side .n{min-width:32px;font-size:.8rem}@media(max-width:600px){.r38-step{gap:10px;padding:16px}.r38-callout{padding:16px}.r38-download a{width:100%;text-align:center}.r38-step h3{font-size:1.05rem}}

/* R40: stack the four requested manual headers on narrow phones. */
@media (max-width: 480px) {
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .topnav { flex-direction: column; align-items: stretch; gap: 12px; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .topnav .brand { align-self: flex-start; max-width: 100%; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .topnav .brand-sub { white-space: nowrap; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .topnav .nav-actions { width: 100%; min-width: 0; justify-content: flex-start; gap: 8px 14px; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .tntsearch-form { display: block; width: 100%; min-width: 0; margin: 0; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .topnav .tntsearch-form { flex: 1 0 100%; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .tntsearch-form .form-group { width: 100%; min-width: 0; margin: 0; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .tntsearch-form .tntsearch-field { width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box; }
  body:is(.scb-hub.bomllm-scope, .scb-hub.icafefx-scope, .scb-hub.redhat-ai-scope, :has(.topnav > .brand[href="/thaillm"])) .tntsearch-powered-by { display: none; }
}
/* r50 2026-11-21 K8+N22: floating UI must not cover body text at <=400px (append-only, reversible) */
@media (max-width: 400px) {
  body { padding-bottom: 148px !important; }
  .consent-root .consent-banner { position: static !important; max-width: 100% !important; box-sizing: border-box; margin: 0 0 8px; }
  #cwf, #scb-theme-btn { inset-block-end: 148px !important; }
  .f { max-width: 100% !important; box-sizing: border-box; }
}
