/* Library styles do not alter the landing, in-person portal, or coach shell. */
.rx-dialog { width:min(940px,calc(100% - 40px)); max-width:none; height:min(800px,90dvh); max-height:90dvh; margin:auto; padding:0; background:#0c100e; border:1px solid #364139; border-radius:8px; overflow:hidden; box-shadow:0 24px 80px #0009; }
.rx-dialog[open] { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); grid-template-rows:auto minmax(0,1fr); }
.rx-dialog::backdrop { background:#000b; }
.rx-top { grid-column:1/-1; display:flex; align-items:center; justify-content:space-between; gap:16px; padding:20px 24px; border-bottom:1px solid #29332c; }
.rx-top h2 { font-size:20px; }
.rx-top .tr-kicker { margin-bottom:4px; }
.rx-top>div { min-width:0; }
.rx-browser { min-width:0; min-height:0; display:flex; flex-direction:column; border-right:1px solid #29332c; }
.rx-search-controls { padding:20px 20px 8px; }
.rx-filters { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-top:12px; }
.rx-result-count { padding:4px 20px 12px; font-size:12px; color:#a3afa5; }
.rx-results { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 12px; }
.rx-results[aria-busy=true] { opacity:.6; }
.rx-result,.rx-launch { display:flex; align-items:center; gap:12px; width:100%; text-align:left; background:transparent; border:0; border-bottom:1px solid #29332c; color:#f0f4ef; border-radius:0; padding:12px 8px; font:inherit; cursor:pointer; min-width:0; box-shadow:none; }
.rx-result:hover,.rx-result[aria-pressed=true] { background:#1e2821; }
.rx-result[aria-pressed=true] { box-shadow:inset 3px 0 #c5ff35; }
.rx-result span,.rx-launch span { flex:1; min-width:0; }
.rx-result strong,.rx-launch strong { display:block; font-size:13px; font-weight:600; line-height:1.45; overflow-wrap:anywhere; }
.rx-result small,.rx-launch small { display:block; margin-top:4px; font-size:11px; }
.rx-result img,.rx-launch img { flex:0 0 auto; object-fit:contain; background:#fff; border-radius:4px; }
.rx-pages { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:12px 20px; border-top:1px solid #29332c; font-size:12px; }
.rx-pages [data-rx=next] svg { transform:rotate(180deg); }
.rx-detail { min-width:0; min-height:0; overflow:auto; overscroll-behavior:contain; padding:20px 24px 24px; }
.rx-detail-top { display:none; margin-bottom:16px; }
.rx-detail h3 { font-size:20px; line-height:1.4; }
.rx-detail h4 { margin-top:24px; }
.rx-placeholder { padding:80px 0; text-align:center; }
.rx-variant { font-size:12px; }
.rx-video-frame { width:100%; background:#fff; display:grid; place-items:center; margin-top:20px; padding:16px; border-radius:4px; overflow:hidden; }
.rx-video-frame video { display:block; width:100%; height:auto; max-width:260px; aspect-ratio:1; object-fit:contain; background:#fff; }
.rx-credit { display:block; font-size:10px!important; margin:8px 0 0; }
.rx-video-status:not(:empty) { padding:12px 0; color:#dbc078; font-size:12px; }
.rx-video-status .tr-button { margin-top:8px; }
.rx-prescribed { border-left:2px solid #c5ff35; padding:0 0 0 14px; margin-top:22px; }
.rx-steps { padding-left:20px; color:#c0cbc3; margin:14px 0 0; font-size:13px; }
.rx-steps li { padding-left:5px; margin-bottom:12px; overflow-wrap:anywhere; }
.rx-steps li::marker { color:#c5ff35; font-weight:600; }
.rx-select-footer { position:sticky; bottom:-24px; margin:20px -24px -24px; padding:16px 24px; background:#0c100e; border-top:1px solid #29332c; }
.rx-select-footer .tr-button { width:100%; }
.rx-viewer { width:min(520px,calc(100% - 40px)); }
.rx-viewer[open] { grid-template-columns:minmax(0,1fr); }
.tr-root .rx-launch { margin:12px 0 16px; padding:10px 0; border-top:1px solid #29332c; max-width:420px; }
.tr-root .rx-launch:hover strong { color:#c5ff35; }
.rx-editor-media { margin:8px 0 18px; display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.rx-editor-media .rx-launch { margin:0; flex:1 1 250px; }
.rx-editor-media .tr-actions { flex:0 1 auto; }
.rx-add-actions { margin:16px 0 24px; }
@media(max-width:700px) {
  .rx-dialog,.rx-viewer { width:100%; height:100dvh; max-height:100dvh; max-width:100%; border:0; border-radius:0; margin:0; }
  .rx-dialog[open] { grid-template-columns:minmax(0,1fr); }
  .rx-top { padding:max(16px,env(safe-area-inset-top)) 18px 16px; }
  .rx-top h2 { font-size:18px; }
  .rx-browser { border:0; padding-bottom:env(safe-area-inset-bottom); }
  .rx-picker .rx-detail { display:none; }
  .rx-picker.rx-has-detail .rx-detail { display:block; }
  .rx-picker.rx-has-detail .rx-browser { display:none; }
  .rx-detail { padding:18px 20px max(24px,env(safe-area-inset-bottom)); }
  .rx-detail-top { display:block; }
  .rx-select-footer { margin-left:-20px; margin-right:-20px; padding:14px 20px max(14px,env(safe-area-inset-bottom)); }
  .rx-video-frame { padding:12px; }
  .rx-video-frame video { max-width:240px; }
  .rx-search-controls { padding:16px 18px 8px; }
  .rx-result-count { padding-left:18px; }
}
