/* Exact current MEDCORE summary-viewer structure, copied into Mr.pharmacist only. */
#contentArea:has(.medcore-summary-viewer-page),
.content-area:has(.medcore-summary-viewer-page),
.workspace:has(.medcore-summary-viewer-page){overflow-x:hidden!important;overflow-y:auto!important;overscroll-behavior-y:auto!important;touch-action:pan-y!important;-webkit-overflow-scrolling:touch!important}
.page-content:has(.medcore-summary-viewer-page),
.medcore-summary-viewer-page,
.medcore-summary-document-shell:not(:fullscreen),
.medcore-summary-document-shell:not(:fullscreen) .medcore-summary-pdf-layout.is-ready,
.medcore-summary-document-shell:not(:fullscreen) .medcore-summary-pdf-main,
.medcore-summary-document-shell:not(:fullscreen) .medcore-summary-pdf-stage{overscroll-behavior:auto!important;touch-action:pan-y!important}
.medcore-summary-viewer-page{display:grid;gap:18px;width:100%;min-width:0;scroll-margin-top:0;color:#173e49;user-select:none;-webkit-user-select:none}
.medcore-summary-viewer-page *,.medcore-summary-viewer-page *::before,.medcore-summary-viewer-page *::after{box-sizing:border-box}
.medcore-summary-viewer-page button{font:inherit;-webkit-tap-highlight-color:transparent;touch-action:manipulation}
.medcore-summary-viewer-page button:disabled{opacity:.38;cursor:not-allowed}
.medcore-summary-viewer-hero{position:relative;display:grid;grid-template-columns:minmax(0,1fr) 290px;gap:28px;align-items:center;padding:30px 32px;border:1px solid rgba(34,123,132,.22);border-radius:28px;overflow:hidden;background:radial-gradient(circle at 84% 6%,rgba(204,170,86,.19),transparent 31%),linear-gradient(135deg,#082d3a 0%,#0d4856 57%,#12636d 100%);box-shadow:0 24px 62px rgba(4,35,47,.18);color:#fff}
.medcore-summary-viewer-hero::after{content:'';position:absolute;right:-80px;bottom:-135px;width:360px;height:360px;border:1px solid rgba(255,255,255,.08);border-radius:50%;box-shadow:0 0 0 42px rgba(255,255,255,.025),0 0 0 84px rgba(255,255,255,.018);pointer-events:none}
.medcore-summary-viewer-identity{position:relative;z-index:1;min-width:0}
.medcore-summary-viewer-back{display:inline-flex;align-items:center;gap:7px;margin:0 0 22px;padding:0;border:0;background:transparent;color:#bfe6e6;font-size:.79rem;font-weight:850;text-decoration:none;cursor:pointer}
.medcore-summary-viewer-back:hover{color:#fff}
.medcore-summary-viewer-hero .eyebrow{margin:0 0 9px;color:#d9bb70;font-size:.69rem;font-weight:950;letter-spacing:.14em}
.medcore-summary-viewer-hero h1{margin:0;max-width:850px;color:#fff;font-size:clamp(1.8rem,3.2vw,3rem);line-height:1.05;letter-spacing:-.045em}
.medcore-summary-viewer-hero h1::after{content:'';display:block;width:72px;height:3px;margin-top:17px;border-radius:999px;background:linear-gradient(90deg,#d6af55,#f2dc9d)}
.medcore-summary-viewer-hero p:not(.eyebrow){max-width:780px;margin:16px 0 0;color:#d2e4e7;font-size:.96rem;line-height:1.7}
.medcore-summary-viewer-path{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:22px}
.medcore-summary-viewer-path span{padding:7px 10px;border:1px solid rgba(235,205,132,.3);border-radius:999px;background:rgba(212,174,82,.14);color:#f1d895;font-size:.68rem;font-weight:950;letter-spacing:.11em}
.medcore-summary-viewer-path b{color:#d8e9eb;font-size:.76rem}
.medcore-summary-viewer-seal{position:relative;z-index:1;display:grid;justify-items:center;padding:24px 20px;border:1px solid rgba(255,255,255,.14);border-radius:22px;background:linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.055));box-shadow:inset 0 1px rgba(255,255,255,.12);backdrop-filter:blur(12px);text-align:center}
.medcore-summary-viewer-seal i{display:grid;place-items:center;width:58px;height:58px;margin-bottom:14px;border:1px solid rgba(245,218,151,.58);border-radius:19px;background:linear-gradient(145deg,#c79a3f,#efd887);box-shadow:0 14px 30px rgba(0,0,0,.2);color:#173e48;font-size:1.45rem;font-style:normal;font-weight:950}
.medcore-summary-viewer-seal span{color:#e4c77c;font-size:.65rem;font-weight:950;letter-spacing:.14em}
.medcore-summary-viewer-seal b{margin-top:7px;color:#fff;font-size:1rem}
.medcore-summary-viewer-seal small{margin-top:8px;color:#c8dfe2;font-size:.72rem;line-height:1.55}
.medcore-summary-viewer-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
.medcore-summary-viewer-stats article{display:grid;gap:6px;min-width:0;padding:17px 19px;border:1px solid #d8e7e9;border-radius:18px;background:linear-gradient(145deg,#fff,#f7fbfb);box-shadow:0 10px 26px rgba(4,35,47,.055)}
.medcore-summary-viewer-stats span{color:#729096;font-size:.64rem;font-weight:950;letter-spacing:.13em}
.medcore-summary-viewer-stats b{overflow:hidden;color:#173e49;font-size:.88rem;text-overflow:ellipsis;white-space:nowrap}
.medcore-summary-document-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;min-width:0;border:1px solid #cbdde0;border-radius:27px;overflow:hidden;background:#f4f8f8;box-shadow:0 28px 72px rgba(8,43,54,.16)}
.medcore-summary-document-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;min-height:76px;padding:13px 16px 13px 18px;border-bottom:1px solid rgba(255,255,255,.1);background:linear-gradient(135deg,#0b2934,#103d49);color:#fff}
.medcore-summary-document-mark{display:flex;align-items:center;gap:12px;min-width:0}
.medcore-summary-document-mark>span{display:grid;place-items:center;flex:0 0 auto;width:43px;height:43px;border:1px solid rgba(239,210,142,.55);border-radius:14px;background:linear-gradient(145deg,#c7973b,#efd581);color:#103743;font-family:Georgia,serif;font-size:1.25rem;font-weight:950}
.medcore-summary-document-mark div{display:grid;min-width:0}
.medcore-summary-document-mark small{color:#d3b96e;font-size:.61rem;font-weight:950;letter-spacing:.13em}
.medcore-summary-document-mark b{margin-top:3px;overflow:hidden;color:#fff;font-size:.88rem;text-overflow:ellipsis;white-space:nowrap}
.medcore-summary-document-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.medcore-summary-document-actions>span{display:inline-flex;align-items:center;gap:7px;color:#afc7cb;font-size:.7rem;font-weight:850}
.medcore-summary-document-actions>span i{width:8px;height:8px;border-radius:50%;background:#d2a94e;box-shadow:0 0 0 4px rgba(210,169,78,.13)}
.medcore-summary-document-actions>span.is-ready i{background:#52c69b;box-shadow:0 0 0 4px rgba(82,198,155,.13)}
.medcore-summary-document-actions .secondary{min-height:38px;padding:8px 13px;border:1px solid rgba(255,255,255,.17);border-radius:12px;background:rgba(255,255,255,.08);color:#fff;font-size:.72rem;font-weight:850;cursor:pointer}
.medcore-summary-pdf-layout{display:grid;grid-template-columns:minmax(0,1fr) 132px;height:auto;min-height:0;overflow:visible;align-items:start;background:linear-gradient(145deg,#f7fbfb,#e8f0f1)}
.medcore-summary-pdf-main{display:grid;grid-template-rows:auto auto;min-width:0;min-height:0;overflow:visible;border-right:1px solid #d6e3e5}
.medcore-summary-pdf-stage{position:relative;display:block;width:100%;height:auto;min-height:0;padding:10px 12px 14px;overflow:visible;overscroll-behavior:auto;touch-action:pan-y;-webkit-overflow-scrolling:auto;background:radial-gradient(circle at 50% 0%,#fff 0%,#f4f8f8 48%,#e5edef 100%)}
.medcore-summary-pdf-stage>img{position:relative;z-index:2;display:block;width:100%;height:auto;max-width:100%;max-height:none;margin:0 auto;border:1px solid #d8e3e5;border-radius:8px;background:#fff;box-shadow:0 24px 64px rgba(19,55,66,.18);object-fit:initial;object-position:initial;transform-origin:50% 0;touch-action:pan-y;pointer-events:auto;-webkit-user-select:none;user-select:none;-webkit-user-drag:none}
.medcore-summary-document-loading{position:absolute;inset:0;z-index:1;display:grid;place-content:center;justify-items:center;gap:9px;color:#173e49;text-align:center}
.medcore-summary-document-loading b{font-size:1rem}.medcore-summary-document-loading small{color:#6f878d;font-size:.72rem}
.medcore-summary-viewer-spinner{width:34px;height:34px;border:3px solid rgba(23,121,129,.18);border-top-color:#d4b466;border-radius:50%;animation:medcore-summary-spin .75s linear infinite}
.medcore-summary-page-controls{display:grid;grid-template-columns:auto minmax(150px,1fr) auto;align-items:center;gap:16px;min-height:68px;padding:10px 12px;border-top:1px solid rgba(255,255,255,.09);background:linear-gradient(135deg,#0b2934,#103844)}
.medcore-summary-page-controls>div{display:grid;justify-items:center;color:#fff;text-align:center}.medcore-summary-page-controls small{color:#d4b96f;font-size:.59rem;font-weight:950;letter-spacing:.15em}.medcore-summary-page-controls b{margin-top:2px;font-size:1rem}.medcore-summary-page-controls b span{color:#8faeb4;font-weight:750}.medcore-summary-page-controls em{margin-top:3px;color:#91aeb4;font-size:.66rem;font-style:normal}.medcore-summary-page-controls button{min-width:104px;min-height:40px;padding:8px 12px;border-radius:12px;font-size:.72rem;font-weight:850;cursor:pointer}.medcore-summary-page-controls .secondary{border:1px solid rgba(255,255,255,.17);background:rgba(255,255,255,.08);color:#fff}.medcore-summary-page-controls .primary{border:1px solid rgba(239,210,142,.58);background:linear-gradient(145deg,#c7973b,#efd581);color:#123b45}
.medcore-summary-page-rail{display:grid;grid-template-rows:auto minmax(0,1fr);align-self:start;height:calc(100dvh - 170px);min-height:520px;max-height:860px;min-width:0;overflow:hidden;border-left:1px solid #d6e3e5;background:linear-gradient(180deg,#f8fbfb,#eaf2f3)}
.medcore-summary-page-rail>header{display:flex;align-items:center;justify-content:space-between;gap:8px;min-height:62px;padding:10px;border-bottom:1px solid #d6e3e5}.medcore-summary-page-rail>header div{display:grid}.medcore-summary-page-rail>header small{color:#98731e;font-size:.52rem;font-weight:950;letter-spacing:.1em}.medcore-summary-page-rail>header b{margin-top:4px;color:#173e49;font-size:.72rem}.medcore-summary-page-rail>header>span{display:grid;place-items:center;width:32px;height:32px;border:1px solid #ddc887;border-radius:11px;background:#fff7df;color:#876713;font-size:.67rem;font-weight:950}
.medcore-summary-page-thumbnails{display:grid;align-content:start;gap:8px;padding:8px;overflow:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#c9a84f transparent}
.medcore-summary-page-thumbnails button{display:grid;grid-template-columns:46px minmax(0,1fr);align-items:center;gap:7px;min-width:0;padding:6px;border:1px solid #d4e1e3;border-radius:12px;background:#fff;color:#456068;box-shadow:0 8px 20px rgba(19,55,66,.045);text-align:left;cursor:pointer}.medcore-summary-page-thumbnails button:hover{border-color:#64aeb3;background:#f1f9f9}.medcore-summary-page-thumbnails button.active{border-color:#c9a84f;background:linear-gradient(145deg,#fff9e8,#eef9f8);box-shadow:0 12px 26px rgba(19,55,66,.11)}.medcore-summary-page-thumbnails button>b{overflow:hidden;font-size:.64rem;text-overflow:ellipsis;white-space:nowrap}
.medcore-summary-thumb-image{display:grid;place-items:center;width:46px;aspect-ratio:3/4;overflow:hidden;border-radius:7px;background:#e7eff0}.medcore-summary-thumb-image img{display:block;width:100%;height:100%;object-fit:cover;-webkit-user-drag:none}.medcore-summary-thumb-image i{width:19px;height:19px;border:2px solid rgba(23,121,129,.16);border-top-color:#b38a2b;border-radius:50%;animation:medcore-summary-spin .8s linear infinite}
.medcore-summary-pdf-error{display:grid;place-items:center;gap:9px;min-height:420px;padding:40px;background:linear-gradient(145deg,#f7fbfb,#e8f0f1);color:#173e49;text-align:center}.medcore-summary-pdf-error p{max-width:560px;margin:0;color:#71878d}
.medcore-summary-document-footer{display:flex;align-items:center;justify-content:space-between;gap:14px;min-height:48px;padding:11px 18px;border-top:1px solid rgba(255,255,255,.09);background:#0b2934;color:#b7cbd0;font-size:.7rem}.medcore-summary-document-footer b{color:#ead18d}
.medcore-summary-pdf-layout.is-initial-loading{grid-template-columns:1fr!important;height:auto!important;min-height:clamp(390px,52vh,560px)!important;overflow:hidden!important;background:radial-gradient(circle at 50% 12%,rgba(63,157,163,.14),transparent 34%),linear-gradient(145deg,#f8fcfc,#edf6f6)!important}
.medcore-summary-pdf-layout.is-initial-loading .medcore-summary-pdf-main{display:block!important;min-height:clamp(390px,52vh,560px)!important;overflow:hidden!important;border-right:0!important}
.medcore-summary-pdf-layout.is-initial-loading .medcore-summary-pdf-stage{position:relative!important;display:grid!important;place-items:center!important;width:100%!important;height:auto!important;min-height:clamp(390px,52vh,560px)!important;padding:28px!important;overflow:hidden!important;background:transparent!important}
.medcore-summary-pdf-layout.is-initial-loading .medcore-summary-document-loading{position:relative!important;inset:auto!important;display:grid!important;place-content:center!important;justify-items:center!important;gap:10px!important;width:min(430px,calc(100% - 24px))!important;min-height:210px!important;padding:34px 30px!important;border:1px solid rgba(31,126,135,.18)!important;border-radius:24px!important;background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(244,251,251,.96))!important;box-shadow:0 24px 60px rgba(7,54,65,.12)!important;color:#173e49!important}
.medcore-summary-pdf-layout.is-initial-loading .medcore-summary-page-controls,.medcore-summary-pdf-layout.is-initial-loading .medcore-summary-page-rail{display:none!important}
.medcore-summary-pdf-stage:has(.medcore-summary-document-loading):not(:has(>img)){position:relative!important;min-height:clamp(360px,48vh,520px)!important}
.medcore-summary-pdf-stage.is-medcore-pinching,.medcore-summary-pdf-stage.is-medcore-zoomed{overflow:auto!important;overscroll-behavior:auto!important;touch-action:none!important;-webkit-overflow-scrolling:touch!important}.medcore-summary-pdf-stage.is-medcore-zoomed>img{max-width:none!important}
.medcore-summary-document-shell:fullscreen{width:100vw;height:100vh;min-height:0;border:0;border-radius:0}.medcore-summary-document-shell:fullscreen .medcore-summary-pdf-layout{height:calc(100dvh - 124px)!important;min-height:0!important;overflow:hidden!important}.medcore-summary-document-shell:fullscreen .medcore-summary-pdf-main{grid-template-rows:minmax(0,1fr) auto!important;overflow:hidden!important}.medcore-summary-document-shell:fullscreen .medcore-summary-pdf-stage{display:grid!important;place-items:start center!important;height:100%!important;min-height:0!important;padding:10px 12px!important;overflow-x:auto!important;overflow-y:auto!important;touch-action:pan-x pan-y!important;-webkit-overflow-scrolling:touch!important}.medcore-summary-document-shell:fullscreen .medcore-summary-pdf-stage>img{width:min(100%,1280px)!important;max-width:none!important;height:auto!important;touch-action:pan-x pan-y!important;overscroll-behavior:auto!important}.medcore-summary-document-shell:fullscreen .medcore-summary-page-rail{align-self:stretch!important;height:auto!important;min-height:0!important;max-height:none!important}
@keyframes medcore-summary-spin{to{transform:rotate(360deg)}}
@media(max-width:980px){.medcore-summary-viewer-hero{grid-template-columns:1fr}.medcore-summary-viewer-seal{grid-template-columns:auto 1fr;justify-items:start;column-gap:14px;text-align:left}.medcore-summary-viewer-seal i{grid-row:1/5;margin:0}.medcore-summary-viewer-stats{grid-template-columns:1fr}}
@media(max-width:760px){.medcore-summary-viewer-page{gap:12px}.medcore-summary-viewer-hero{padding:23px 20px;border-radius:22px}.medcore-summary-viewer-back span{display:none}.medcore-summary-viewer-seal{padding:17px}.medcore-summary-document-shell{border-radius:20px}.medcore-summary-document-toolbar{align-items:flex-start;flex-wrap:wrap;padding:12px}.medcore-summary-document-actions{width:100%;justify-content:space-between}.medcore-summary-pdf-layout.is-ready{grid-template-columns:1fr!important}.medcore-summary-pdf-main{border-right:0}.medcore-summary-page-rail{grid-row:2;align-self:auto;height:auto;min-height:0;max-height:none;border-left:0;border-top:1px solid #d6e3e5}.medcore-summary-page-thumbnails{display:flex;gap:9px;overflow-x:auto;overflow-y:hidden;padding:9px}.medcore-summary-page-thumbnails button{flex:0 0 88px;display:grid;grid-template-columns:1fr;justify-items:center;text-align:center}.medcore-summary-thumb-image{width:54px}.medcore-summary-page-controls{grid-template-columns:1fr auto 1fr}.medcore-summary-page-controls em{display:none}.medcore-summary-page-controls button{min-width:0}.medcore-summary-document-footer{display:grid;justify-items:center;gap:4px;text-align:center}}
@media(max-width:520px){.medcore-summary-viewer-hero h1{font-size:clamp(1.65rem,8vw,2.2rem)}.medcore-summary-page-controls{gap:8px;padding:10px 8px}.medcore-summary-page-controls button{padding-inline:7px;font-size:.66rem}.medcore-summary-document-actions>span{font-size:.64rem}}
@media(prefers-reduced-motion:reduce){.medcore-summary-viewer-spinner,.medcore-summary-thumb-image i{animation-duration:1.4s}}
