/* EMS Link · Arrivals — phones held upright (2026-10-02).
   One media query: up to 720 px wide, minus the short landscape case that
   phone-landscape.css owns (orientation:landscape and max-height:500px).
   Load after arrivals.css, transcript-popup.css, activation-popup.css, tour.css
   (and demo.css), before phone-landscape.css. Desktop and tablet never match.
   Root causes fixed here: the radio sonar and the seven time-window buttons
   were wider than the phone, so the page scrolled sideways and every fixed
   popup was centred in a too-wide viewport; the transcript kept its desktop
   timeline and a right-hand tag column. Safe-area padding assumes the page
   sets viewport-fit=cover (dashboard.html does). */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%}
@media (max-width:720px) and (orientation:portrait),(max-width:720px) and (min-height:501px){
/* ---------- Top bar: one sticky row ---------- */
#ems-light-themes .ab-bar{position:sticky;top:0;height:auto;min-height:0;flex-wrap:nowrap;gap:6px;padding:calc(6px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 6px max(10px,env(safe-area-inset-left));overflow:hidden}
#ems-light-themes .ab-bar>*{flex-shrink:0}
#ems-light-themes .ab-bar>.ab-spacer{display:none}
#ems-light-themes .ab-brand{min-width:44px;height:44px;justify-content:center}
#ems-light-themes .ab-dept{order:0;flex:1 1 auto;min-width:0;height:44px;border-radius:10px}
#ems-light-themes .ab-dept select{flex:1 1 auto;width:100%;min-width:0;max-width:none;height:calc(100% + 2px);margin:-1px 0;font-size:16px;text-overflow:ellipsis}
#ems-light-themes .ab-radio{order:1}
#ems-light-themes .ab-live{order:2;height:44px;padding:0 11px;border-radius:10px}
#ems-light-themes .ab-icon{order:3;width:44px;height:44px;border-radius:10px}
#ems-light-themes .ab-account{order:4;width:44px;height:44px;padding:0;justify-content:center}
#ems-light-themes .ab-account .ab-chevron{display:none}
#ems-light-themes .ab-account>span{width:34px;height:34px;font-size:13px}

/* ---------- Title ---------- */
#ems-light-themes .ab-main{padding:12px max(12px,env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(12px,env(safe-area-inset-left))}
#ems-light-themes .ab-title{gap:2px 12px;align-items:baseline}
#ems-light-themes .ab-title h1{font-size:22px;line-height:1.25}
#ems-light-themes .ab-title>.ab-spacer{display:none}
#ems-light-themes .ab-sync{order:1;margin-left:auto;text-align:right}
#ems-light-themes #board-count{order:2;flex-basis:100%;font-size:13px}
#ems-light-themes .ab-chips{order:3;flex-basis:100%;margin-top:8px;gap:8px}
#ems-light-themes .ab-chips:empty{display:none}
#ems-light-themes .ab-chip{height:36px;padding:0 9px 0 12px;font-size:11.5px}

/* ---------- Toolbar: time window on its own row, then sort / hidden / layout ---------- */
#ems-light-themes .ab-toolbar{margin-top:12px;gap:8px;padding:8px}
#ems-light-themes .ab-toolbar>.ab-spacer,#ems-light-themes .ab-hint,#ems-light-themes #timeline-toggle{display:none}
#ems-light-themes .ab-range{flex:1 1 100%;min-width:0;padding:3px}
#ems-light-themes .ab-range-thumb{display:none}
#ems-light-themes .ab-range .time-btn{flex:1 1 0;min-width:0;height:44px;padding:0 2px;font-size:13.5px}
#ems-light-themes .ab-range .time-btn[aria-pressed="true"]{background:var(--blue);box-shadow:0 2px 6px rgba(34,103,145,.35)}
#ems-light-themes .ab-sort{flex:1 1 0;min-width:0;gap:8px}
#ems-light-themes .ab-sort select{flex:1 1 auto;min-width:0;height:44px;padding:0 8px;font-size:16px}
#ems-light-themes .ab-tool{height:44px;padding:0 11px;font-size:14px}
#ems-light-themes .ab-seg{padding:3px}
#ems-light-themes .ab-toolbar .ab-seg button{height:38px;padding:0 11px;font-size:14px}

/* ---------- Patient cards: content height, larger type and targets ---------- */
#ems-light-themes .patient-grid{margin-top:12px;gap:12px}
#ems-light-themes .patient{border-radius:16px}
#ems-light-themes .p-strip{height:auto;min-height:44px;gap:6px;padding:4px 4px 4px 14px}
#ems-light-themes .p-strip-text{font-size:11.5px}
#ems-light-themes .p-strip .medic-activation-symbol{height:36px;padding:0 10px;border-radius:8px;font-size:12px}
#ems-light-themes .hide-patient{width:44px;height:36px;border-radius:8px}
#ems-light-themes .patient-head{height:auto;padding:14px 14px 12px;gap:12px}
#ems-light-themes .patient-head .acuity{width:44px;height:44px;font-size:21px}
#ems-light-themes .patient-age{font-size:24px}
#ems-light-themes .p-age-unit,#ems-light-themes .p-sex{font-size:15px}
#ems-light-themes .p-sub{font-size:13px}
#ems-light-themes .eta-remaining{font-size:22px}
#ems-light-themes .eta-at{font-size:13px}
#ems-light-themes .medic-row{height:auto;min-height:60px;padding:8px 8px 8px 10px}
#ems-light-themes .medic-copy strong{font-size:17px}
#ems-light-themes .medic-copy span{font-size:13px}
#ems-light-themes .medic-clip{height:40px;padding:0 14px 0 12px;font-size:13px}
#ems-light-themes .complaint{height:auto;gap:6px;padding:14px 14px 12px}
#ems-light-themes .complaint>div>span,#ems-light-themes .vitals-caption>span:first-child{font-size:12px}
#ems-light-themes .complaint strong{font-size:17px;-webkit-line-clamp:4}
#ems-light-themes .complaint-more{height:32px;padding:0 12px;border-radius:8px;font-size:12px}
#ems-light-themes .vitals-block{height:auto;gap:10px;padding:12px 12px 14px}
#ems-light-themes .vitals-caption{font-size:12px}
#ems-light-themes .vitals{grid-auto-rows:minmax(64px,auto);gap:8px}
#ems-light-themes .vital{gap:2px;padding:9px 10px 8px;border-radius:10px}
#ems-light-themes .vital-label,#ems-light-themes .vital small,#ems-light-themes .vital-unit{font-size:12px}
#ems-light-themes .vital-reading{font-size:19px}
#ems-light-themes .p-note{height:auto;min-height:44px;margin:0 12px 12px;font-size:13px}
#ems-light-themes .p-actions{padding:0 12px 12px}
#ems-light-themes .p-actions>*{height:46px;font-size:14px}
#ems-light-themes .p-status{height:34px}
#ems-light-themes .p-stage-text{font-size:12px}

/* Small controls keep their look but get a touch area at least 44 px tall */
#ems-light-themes :is(.ab-chip,.complaint-more,.hide-patient,.medic-activation-symbol,.medic-clip,.medic-copy,.ab-toolbar .ab-seg button){position:relative}
#ems-light-themes :is(.ab-chip,.complaint-more,.hide-patient,.medic-activation-symbol,.medic-clip,.ab-toolbar .ab-seg button)::after{content:"";position:absolute;inset:-7px -2px}
#ems-light-themes .medic-copy::after{content:"";position:absolute;inset:-11px 0}

/* ---------- List view ---------- */
#ems-light-themes .ab-list{margin-top:12px;gap:12px}
#ems-light-themes .ab-row{min-height:64px;gap:6px 12px;padding:12px 14px}
#ems-light-themes .ab-row-complaint{font-size:15px;white-space:normal;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
#ems-light-themes .ab-row-meta{flex-wrap:wrap;row-gap:4px;white-space:normal;font-size:12.5px}
#ems-light-themes .ab-list-detail{scroll-margin-top:72px}

/* ---------- Activation alert, replay chip and toasts sit above the home indicator ---------- */
#ems-light-themes .ab-alert{left:max(8px,env(safe-area-inset-left));right:max(8px,env(safe-area-inset-right));bottom:calc(8px + env(safe-area-inset-bottom));width:auto;max-height:calc(100dvh - 16px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto;border-radius:18px}
#ems-light-themes .aa-head{padding:12px 16px}
#ems-light-themes .aa-head strong{font-size:14px}
#ems-light-themes .aa-who{gap:12px;padding:14px 16px 8px}
#ems-light-themes .aa-who .acuity{width:48px;height:48px;font-size:24px}
#ems-light-themes .aa-who strong{font-size:19px}
#ems-light-themes .aa-eta strong{font-size:26px}
#ems-light-themes .aa-complaint{padding:0 16px 12px}
#ems-light-themes .aa-actions{gap:8px;padding:0 16px 16px}
#ems-light-themes .aa-actions .ab-btn{height:46px;padding:0 12px}
#ems-light-themes .aa-actions .ab-btn-icon{width:46px;padding:0}
#ems-light-themes .ab-alert-replay{right:max(12px,env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));height:44px}
#ems-light-themes .ab-toast{left:max(12px,env(safe-area-inset-left));right:max(12px,env(safe-area-inset-right));bottom:calc(12px + env(safe-area-inset-bottom));min-height:56px;padding:6px 6px 6px 16px}
#ems-light-themes .ab-toast>span{flex:1;min-width:0}
#ems-light-themes .ab-toast button{height:44px}
#ems-light-themes:has(#activation-alert:not([hidden])) .ab-toast{top:calc(8px + env(safe-area-inset-top));bottom:auto}
#ems-light-themes .ab-toast #toast-close{width:44px}

/* ---------- Account menu and live radio ---------- */
#ems-light-themes .ab-menu{top:calc(58px + env(safe-area-inset-top));right:max(8px,env(safe-area-inset-right));width:min(300px,calc(100vw - 16px));max-height:calc(100dvh - 70px - env(safe-area-inset-top) - env(safe-area-inset-bottom));overflow:auto}
#ems-light-themes .ab-menu-items>*{height:48px;font-size:15px}
#ems-light-themes .ab-live-panel{left:max(8px,env(safe-area-inset-left))!important;right:max(8px,env(safe-area-inset-right));width:auto}
#ems-light-themes .lp-head{gap:10px;padding:12px 12px 12px 16px}
#ems-light-themes .lp-title strong{font-size:17px}
#ems-light-themes .lp-close{width:44px;height:44px}
#ems-light-themes .lp-feed select{height:44px;font-size:16px}
#ems-light-themes .lp-deck{gap:12px 14px;padding:14px 16px}
#ems-light-themes .lp-mute{width:44px;height:44px}
#ems-light-themes .lp-volume input{height:44px}
#ems-light-themes .lp-item{grid-template-columns:44px minmax(0,1fr);gap:10px;padding:12px}
#ems-light-themes .lp-item-play{width:44px;height:44px}
#ems-light-themes .lp-item p,#ems-light-themes .lp-now p{font-size:15px}
#ems-light-themes .lp-foot{padding:12px 16px}
#ems-light-themes .lp-foot a{display:inline-flex;align-items:center;min-height:44px}

/* ---------- Sheets: editor, details and activation rise from the bottom; drawers fill the screen ---------- */
html:has(#ems-light-themes dialog[open]){overflow:hidden}
#ems-light-themes :is(.editor-form,.ab-drawer-body,.ab-report-body,.lp-recent),#ems-light-themes .ab-popover{overscroll-behavior:contain}
#ems-light-themes .v2-dialog:not(#medic-transcript):not(#activation-dialog):is(.ab-editor,.ab-report),#ems-light-themes #activation-dialog{width:100%;max-width:100%;max-height:calc(100dvh - 12px - env(safe-area-inset-top));margin:auto 0 0;border-radius:20px 20px 0 0}
#ems-light-themes .ab-editor form{max-height:calc(100dvh - 12px - env(safe-area-inset-top))}
#ems-light-themes #activation-dialog{max-height:calc(100dvh - 12px - env(safe-area-inset-top));border-width:1px 0 0}
#ems-light-themes .ab-drawer{width:100%;max-width:100%}
#ems-light-themes .v2-dialog[open]:not(#medic-transcript){animation:ph-sheet-in .24s cubic-bezier(.2,.8,.2,1)}
#ems-light-themes .v2-dialog .modal-head{gap:12px;padding:14px 14px 14px 18px}
#ems-light-themes .v2-dialog.ab-drawer .modal-head{padding-top:calc(14px + env(safe-area-inset-top))}
#ems-light-themes .v2-dialog .modal-title strong{font-size:19px}
#ems-light-themes .v2-dialog:not(#medic-transcript):not(#activation-dialog) .modal-close{width:44px;height:44px}
#ems-light-themes #activation-dialog .modal-close{width:44px;height:44px;font-size:24px;line-height:1}
#ems-light-themes #activation-dialog .ap-evidence>summary{min-height:44px}
#ems-light-themes .editor-actions,#ems-light-themes .ab-act-foot{flex-wrap:wrap;gap:8px;padding:12px max(16px,env(safe-area-inset-right)) calc(12px + env(safe-area-inset-bottom)) max(16px,env(safe-area-inset-left))}
#ems-light-themes .editor-actions .ab-foot-note,#ems-light-themes .ab-act-foot>span{flex:1 1 100%}
#ems-light-themes .editor-actions .ab-btn,#ems-light-themes .ab-act-foot .ab-btn{flex:1 1 0;height:46px}
#ems-light-themes .editor-actions .ab-foot-note:empty{display:none}
#ems-light-themes .ab-settings .editor-actions>.ab-spacer{display:none}
#ems-light-themes .editor-form{gap:12px;padding:16px 16px 12px}
#ems-light-themes .editor-form label,#ems-light-themes .eta-time-title{font-size:13px}
#ems-light-themes .editor-form input,#ems-light-themes .editor-form select,#ems-light-themes .ab-drawer textarea,#ems-light-themes .ab-set-grid select,#ems-light-themes .ab-inline select{height:46px;font-size:16px}
#ems-light-themes .eta-time-control button{height:46px;min-width:46px}
#ems-light-themes .ab-lock,#ems-light-themes .form-error{margin-left:16px;margin-right:16px}
#ems-light-themes .ab-report-body{max-height:none;padding:16px 16px calc(20px + env(safe-area-inset-bottom))}
#ems-light-themes .ab-report-body .complaint-split{grid-template-columns:minmax(0,1fr)}
#ems-light-themes .ab-report-body strong{font-size:15px}
#ems-light-themes .ab-drawer-body{padding:16px}
#ems-light-themes .ab-drawer textarea{height:200px;padding:12px;font-size:16px}
#ems-light-themes .ab-quick button{position:relative;height:40px;padding:0 12px;font-size:13px}
#ems-light-themes .ab-quick button::after{content:"";position:absolute;inset:-3px 0}
#ems-light-themes .ab-set-grid{gap:12px}
#ems-light-themes .ab-set-grid label{font-size:13px}
#ems-light-themes .ab-set-row{flex-wrap:wrap;padding:12px 0}
#ems-light-themes .ab-set-row>div:first-child{flex:1 1 200px;min-width:0}
#ems-light-themes .ab-set-row strong,#ems-light-themes .ab-set-block>strong{font-size:15px}
#ems-light-themes .ab-set-row span{font-size:13px}
#ems-light-themes .ab-set-row>.ab-seg{flex:1 1 100%}
#ems-light-themes .ab-set-row>.ab-seg button{flex:1 1 0;justify-content:center;height:44px}
#ems-light-themes .ab-set-row .ab-btn{height:44px}
#ems-light-themes .ab-switch{width:51px;height:31px;border-radius:16px}
#ems-light-themes .ab-switch::after{width:27px;height:27px;top:2px;left:2px}
#ems-light-themes .ab-switch[aria-checked="true"]::after{left:22px}
#ems-light-themes .ab-switch::before{content:"";position:absolute;inset:-7px -2px}
#ems-light-themes .ab-type-chips button{position:relative;height:40px;padding:0 14px 0 10px;font-size:13px}
#ems-light-themes .ab-type-chips button::after{content:"";position:absolute;inset:-4px 0}
#ems-light-themes .ab-inline{flex-wrap:wrap}
#ems-light-themes .ab-inline select{flex:1 1 100%;min-width:0}
#ems-light-themes #activation-dialog>.modal-body{padding:16px 14px 20px}

/* ---------- Medic transcript: a full-screen sheet ---------- */
#ems-light-themes #medic-transcript{inset:0;width:100%;max-width:100%;height:100dvh;max-height:100dvh;margin:0;padding:0;border:0;border-radius:0;overflow:hidden;overscroll-behavior:contain;box-shadow:none}
#ems-light-themes #medic-transcript .mt-window{height:100%;min-height:0;grid-template-rows:auto auto minmax(0,1fr) auto;overflow:hidden}
#ems-light-themes #medic-transcript .mt-head{grid-row:1}
#ems-light-themes #medic-transcript .mt-timeline{grid-row:2}
#ems-light-themes #medic-transcript .mt-main{grid-row:3}
#ems-light-themes #medic-transcript .mt-player{grid-row:4}
/* Header: badge, title and close on one row; the pipeline status sits under the title */
#ems-light-themes #medic-transcript .mt-head{position:relative;z-index:3;flex-wrap:wrap;align-items:center;gap:2px 12px;min-height:0;padding:calc(8px + env(safe-area-inset-top)) max(10px,env(safe-area-inset-right)) 8px max(14px,env(safe-area-inset-left))}
#ems-light-themes #medic-transcript .mt-esi{width:40px;height:40px;border-radius:10px;font-size:20px}
#ems-light-themes #medic-transcript .mt-heading{flex:1 1 0}
#ems-light-themes #medic-transcript .mt-eyebrow{display:none}
#ems-light-themes #medic-transcript .mt-heading h2{margin:0 0 1px;font-size:18px}
#ems-light-themes #medic-transcript .mt-heading p{font-size:13px;line-height:1.35}
#ems-light-themes #medic-transcript .mt-close{order:2;width:44px;height:44px;margin-left:0;border-radius:12px;font-size:26px}
#ems-light-themes #medic-transcript .mt-pipeline{order:3;flex:1 1 100%;gap:7px;min-height:20px;margin:2px 0 0 52px;font-size:12px;white-space:normal}
#ems-light-themes #medic-transcript .mt-spinner{width:14px;height:14px}
#ems-light-themes #medic-transcript .mt-check{width:18px;height:18px;font-size:12px}
#ems-light-themes #medic-transcript .mt-pipeline:empty{display:none}
/* Conversation and snapshot scroll together under the header */
#ems-light-themes #medic-transcript .mt-main{display:block;min-height:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch}
#ems-light-themes #medic-transcript .mt-conversation{display:block;max-height:none}
#ems-light-themes #medic-transcript .mt-conversation-top{flex-wrap:wrap;gap:2px 12px;padding:14px max(18px,env(safe-area-inset-right)) 4px max(18px,env(safe-area-inset-left))}
#ems-light-themes #medic-transcript .mt-conversation-top h3{font-size:15px}
#ems-light-themes #medic-transcript .mt-conversation-top span{font-size:12px}
#ems-light-themes #medic-transcript .mt-conversation-scroll{overflow:visible;max-height:none}
#ems-light-themes #medic-transcript .mt-lines{padding:4px max(8px,env(safe-area-inset-right)) 12px max(8px,env(safe-area-inset-left))}
/* Each paragraph: time and topic tags on one line above the full-width text */
#ems-light-themes #medic-transcript .mt-line{grid-template-columns:auto minmax(0,1fr);grid-template-areas:"time tags" "copy copy";align-items:center;gap:6px 10px;margin:2px 0;padding:12px 10px 14px;border-radius:12px;scroll-margin:12px}
#ems-light-themes #medic-transcript .mt-line time{grid-area:time;padding:0;font-size:12px;line-height:22px}
#ems-light-themes #medic-transcript .mt-line .mt-line-body{display:contents}
#ems-light-themes #medic-transcript .mt-line .mt-line-tags{grid-area:tags;flex-direction:row;flex-wrap:wrap;align-items:center;justify-content:flex-start;gap:4px;padding:0}
#ems-light-themes #medic-transcript .mt-line .mt-line-copy{grid-area:copy;font-size:17px;line-height:1.5;overflow-wrap:anywhere}
#ems-light-themes #medic-transcript .mt-tag{padding:4px 8px 4px 7px;font-size:11.5px}
#ems-light-themes #medic-transcript .mt-fallback{padding:14px 10px;font-size:16px}
#ems-light-themes #medic-transcript .mt-transcript-note{display:none}
#ems-light-themes #medic-transcript .mt-snapshot{position:static;max-height:none;overflow:visible;padding:18px max(18px,env(safe-area-inset-right)) 22px max(18px,env(safe-area-inset-left));border-left:0;border-top:1px solid #e0eaf0}
#ems-light-themes #medic-transcript .mt-snapshot h3{font-size:15px}
#ems-light-themes #medic-transcript .mt-chief{padding:12px 14px;margin-bottom:18px}
#ems-light-themes #medic-transcript .mt-chief span{font-size:11px}
#ems-light-themes #medic-transcript .mt-chief strong{font-size:17px;line-height:1.35}
#ems-light-themes #medic-transcript .mt-snapshot .vital>.vital-label{font-size:12px}
#ems-light-themes #medic-transcript .mt-snapshot .vital small{font-size:12px}
#ems-light-themes #medic-transcript .mt-snapshot-note{display:block;font-size:12px}
/* Player: one status line, the scrubber, then thumb-sized controls centred on play, clear of the home indicator */
#ems-light-themes #medic-transcript .mt-player{position:relative;z-index:3;display:grid;grid-template-columns:minmax(0,1fr) auto auto auto minmax(0,1fr);grid-template-areas:"label label label label label" "scrub scrub scrub scrub scrub" ". back play forward speed";align-items:center;gap:0 8px;min-height:0;padding:5px max(14px,env(safe-area-inset-right)) calc(8px + env(safe-area-inset-bottom)) max(14px,env(safe-area-inset-left));box-shadow:0 -6px 18px rgba(21,61,90,.08)}
#ems-light-themes #medic-transcript .mt-player-label{display:block;grid-area:label;min-width:0;text-align:center}
#ems-light-themes #medic-transcript .mt-player-label strong{display:none}
#ems-light-themes #medic-transcript .mt-player-label span{display:block;margin:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;font-size:12px;line-height:16px;color:#52768c}
#ems-light-themes #medic-transcript .mt-skip{display:grid;width:48px;min-width:48px;height:44px;font-size:15px}
#ems-light-themes #medic-transcript #transcript-back{grid-area:back}
#ems-light-themes #medic-transcript #transcript-forward{grid-area:forward}
#ems-light-themes #medic-transcript .mt-play{grid-area:play;width:52px;height:52px;font-size:20px}
#ems-light-themes #medic-transcript .mt-scrub{grid-area:scrub;gap:10px;min-width:0}
#ems-light-themes #medic-transcript .mt-scrub time{min-width:34px;font-size:12px}
#ems-light-themes #medic-transcript .mt-scrub time:last-child{text-align:right}
#ems-light-themes #medic-transcript .mt-scrub input{height:44px;min-width:0;background-size:100% 6px;background-position:center;background-repeat:no-repeat;background-color:transparent}
#ems-light-themes #medic-transcript .mt-scrub input::-webkit-slider-thumb{width:20px;height:20px}
#ems-light-themes #medic-transcript .mt-scrub input::-moz-range-thumb{width:20px;height:20px}
#ems-light-themes #medic-transcript .mt-player-note{display:none}
#ems-light-themes #medic-transcript .mt-speed{grid-area:speed;justify-self:end;min-width:48px;height:44px;font-size:14px}

/* ---------- First-login tour: readable copy, 44 px buttons (tour.js keeps the card inside the safe area) ---------- */
#ems-light-themes .tour-card{padding:18px 18px 14px}
#ems-light-themes .tour-card h2,#ems-light-themes .tour[data-centered="true"] .tour-card h2{font-size:19px}
#ems-light-themes .tour-card p{font-size:15px}
#ems-light-themes .tour-actions .ab-btn{height:44px;padding:0 18px}
#ems-light-themes .tour-skip{min-height:44px;padding:0 8px 0 2px;font-size:14px}
}
/* ---------- Transcript timeline on every phone, upright or on its side ----------
   An evenly spaced rail that scrolls sideways inside the sheet, so topic labels never
   spread past the right edge. dashboard.js (revealTimelineChapter) keeps the current
   topic in view under the same media query. */
@media (max-width:720px),(orientation:landscape) and (max-height:500px){
#ems-light-themes #medic-transcript .mt-timeline{position:relative;padding:6px 0 4px;border-bottom:1px solid #dce9f0;background:#fbfdfe}
#ems-light-themes #medic-transcript .mt-timeline-heading{display:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track{position:relative;display:flex;align-items:stretch;height:auto;padding:0 max(16px,env(safe-area-inset-right)) 0 max(16px,env(safe-area-inset-left));overflow-x:auto;overflow-y:hidden;overscroll-behavior-x:contain;scroll-snap-type:x proximity;scroll-padding-inline:16px;scrollbar-width:none;-webkit-mask-image:linear-gradient(90deg,transparent 0,#000 14px,#000 calc(100% - 22px),transparent);mask-image:linear-gradient(90deg,transparent 0,#000 14px,#000 calc(100% - 22px),transparent)}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track::-webkit-scrollbar{display:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track::before{display:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapters{position:relative;display:flex;flex:none;width:auto;height:auto;min-height:0;padding:0;overflow:visible;background:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapters::after{display:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter{position:relative;top:auto;left:auto!important;flex:0 0 auto;width:auto;min-width:92px;height:auto;min-height:0;padding:0 8px 24px;transform:none;scroll-snap-align:start;pointer-events:auto;cursor:pointer;transition:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter .mt-chapter-labels{position:static;display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:center;gap:4px;height:auto;min-height:24px;margin:0 0 2px;transform:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter time{position:static;transform:none;font-size:11px;line-height:14px}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter-label{padding:5px 9px 5px 8px;font-size:12px}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter::before{display:block;left:0;right:0;bottom:10px;height:2px}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapters .mt-chapter:first-child::before{left:50%}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter::after{left:calc(50% - 4px);bottom:7px;width:8px;height:8px}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter[aria-current="true"]::after{left:calc(50% - 6px);bottom:5px;width:12px;height:12px;background:var(--topic-color,#487f9f);box-shadow:0 0 0 3px #fff,0 0 0 5px color-mix(in srgb,var(--topic-color,#487f9f) 25%,transparent)}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter .mt-dot-hit{bottom:0;width:28px;height:28px}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-chapter:hover{background:transparent}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-end-report{flex:0 0 auto;width:auto;min-width:92px;padding:0 4px 24px 8px;color:#667f90;pointer-events:none}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-end-report::before{display:block;left:0;right:50%}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-end-report .mt-chapter-labels{min-height:24px;font-size:12px;font-weight:700}
#ems-light-themes #medic-transcript .mt-timeline .mt-timeline-track .mt-progress{display:none}
#ems-light-themes #medic-transcript .mt-timeline-empty{height:44px;padding:0 2px;font-size:13px}
}
/* On a phone the account menu and an activation alert share the screen: the menu the
   user just opened sits above the alert (the live radio panel stays under it). */
@media (max-width:720px),(orientation:landscape) and (max-height:500px){
#ems-light-themes .ab-menu{z-index:72}
}
@keyframes ph-sheet-in{from{transform:translateY(28px);opacity:.4}to{transform:none;opacity:1}}

/* Small phones: the header gives up the wordmark, settings gear (it is in the
   account menu too) and the radio label (the dot keeps its colour). */
@media (max-width:480px) and (orientation:portrait){
#ems-light-themes .ab-brand .brand-lockup,#ems-light-themes #settings-toggle{display:none}
#ems-light-themes .ab-dept>svg:first-child{display:none}
#ems-light-themes .ab-dept{padding-left:12px}
#ems-light-themes .ab-bar .ab-radio{order:1;width:10px;height:10px;margin:0 -26px 0 10px;padding:0;gap:0;border:0;border-radius:50%;background:transparent;pointer-events:none}
#ems-light-themes .ab-bar .ab-radio-dot{width:10px;height:10px}
#ems-light-themes .ab-radio>strong,#ems-light-themes .ab-radio-sub{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
#ems-light-themes .ab-bar .ab-radio[data-radio="offline"] .ab-dot{background:#f5c84b}
#ems-light-themes .ab-sort{position:relative;gap:0;font-size:0}
#ems-light-themes .ab-sort::before{content:"";position:absolute;left:11px;top:50%;width:16px;height:16px;margin-top:-8px;background:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23226791' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 2.5v11M2.5 11 5 13.5 7.5 11M11 13.5v-11M8.5 5 11 2.5 13.5 5'/%3E%3C/svg%3E") center/16px no-repeat;pointer-events:none}
#ems-light-themes .ab-sort select{padding-left:33px}
#ems-light-themes .ab-toolbar .ab-seg button{width:44px;justify-content:center;gap:0;padding:0;font-size:0}
#ems-light-themes .ab-toolbar .ab-seg button svg{width:16px;height:16px}
#ems-light-themes .ab-live{padding:0 10px 0 28px}
#ems-light-themes .ab-bar #live-label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
}
/* The narrowest phones (320–359 px): smaller wordmark area and tighter time buttons */
@media (max-width:359px) and (orientation:portrait){
#ems-light-themes .ab-brand{display:none}
#ems-light-themes .ab-range .time-btn{font-size:12px}
#ems-light-themes .ab-toolbar .ab-seg button{padding:0 9px}
#ems-light-themes .aa-actions{flex-wrap:wrap}
#ems-light-themes .aa-actions .ab-btn-alert{flex:1 1 100%}
#ems-light-themes .aa-actions #alert-info{flex:1 1 0}
#ems-light-themes .ab-sort{flex:1 1 100%}
#ems-light-themes .ab-toolbar .ab-tool{flex:1 1 auto;justify-content:center}
}
