.trhuah-pdf {
    --tpv-accent: #315d57;
    --tpv-height: 720px;
    color: #273331;
    background: #fff;
    border: 1px solid #d9dfdd;
    border-radius: 8px;
    overflow: hidden;
    width: 100%;
    min-width: 0;
    margin: 1.5em 0;
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
    text-align: left;
    isolation: isolate;
}
.trhuah-pdf *, .trhuah-pdf *::before, .trhuah-pdf *::after { box-sizing: border-box; }
.trhuah-pdf [hidden] { display: none !important; }
.trhuah-pdf .tpv-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 20px; background: #fff; }
.trhuah-pdf .tpv-heading { display: flex; align-items: center; gap: 10px; min-width: 0; }
.trhuah-pdf .tpv-badge { font-size: 10px; font-weight: 700; letter-spacing: .06em; color: var(--tpv-accent); background: #edf3f0; border-radius: 3px; padding: 4px 6px; flex: none; }
.trhuah-pdf .tpv-title { font: inherit; font-weight: 600; font-size: 15px; margin: 0; overflow-wrap: anywhere; color: inherit; }
.trhuah-pdf .tpv-original { flex: none; color: var(--tpv-accent); font-size: 12px; text-decoration: underline; text-underline-offset: 3px; }
.trhuah-pdf .tpv-file-actions { display: flex; align-items: center; flex-wrap: wrap; justify-content: flex-end; gap: 6px 16px; flex: none; }
.trhuah-pdf .tpv-download { color: var(--tpv-accent); font-size: 12px; font-weight: 600; text-decoration: none; padding: 5px 0; }
.trhuah-pdf .tpv-download:hover { text-decoration: underline; text-underline-offset: 3px; }
.trhuah-pdf .tpv-viewport { position: relative; height: min(var(--tpv-height), 78vh); min-height: 260px; overflow: auto; overscroll-behavior: contain; background: #eef0ed; padding: 20px; outline-offset: -3px; scrollbar-gutter: stable; touch-action: pan-y pinch-zoom; }
.trhuah-pdf .tpv-page { position: relative; margin: 0 auto; flex: none; background: #fff; box-shadow: 0 2px 12px #1f302516; }
.trhuah-pdf canvas { display: block; max-width: none !important; max-height: none !important; margin: 0; border: 0; }
.trhuah-pdf .tpv-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 10px 16px; border-top: 1px solid #d9dfdd; background: #fff; }
.trhuah-pdf .tpv-pagination, .trhuah-pdf .tpv-tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.trhuah-pdf button { appearance: none; font: inherit; font-size: 13px; font-weight: 500; letter-spacing: 0; line-height: 1.2; text-transform: none; color: #33433f; background: transparent; border: 1px solid transparent; border-radius: 4px; min-width: 36px; min-height: 36px; padding: 7px 9px; margin: 0; box-shadow: none; cursor: pointer; transition: background .15s, color .15s; }
.trhuah-pdf button:hover:not(:disabled) { color: var(--tpv-accent); background: #edf3f0; border-color: #d6e2dc; }
.trhuah-pdf button:disabled { opacity: .35; cursor: default; }
.trhuah-pdf :is(button, a, input, .tpv-viewport):focus-visible { outline: 2px solid var(--tpv-accent); outline-offset: 2px; }
.trhuah-pdf input[type="number"] { appearance: textfield; width: 55px; min-width: 0; height: 34px; min-height: 34px; margin: 0; padding: 3px 5px; text-align: center; border: 1px solid #cdd6d1; background: #fff; border-radius: 4px; color: #273331; font: inherit; font-size: 13px; box-shadow: none; }
.trhuah-pdf input[type="number"]::-webkit-inner-spin-button { appearance: none; }
.trhuah-pdf .tpv-page-label { display: inline-flex; align-items: center; gap: 7px; margin: 0; color: #65716d; font: inherit; font-size: 12px; }
.trhuah-pdf [data-role="zoom-label"] { min-width: 38px; text-align: center; color: #65716d; font-size: 12px; font-variant-numeric: tabular-nums; }
.trhuah-pdf .tpv-status { margin: 0; padding: 7px 20px; color: #65716d; background: #fff; font-size: 11px; border-top: 1px solid #edf0ee; }
.trhuah-pdf .tpv-error, .trhuah-pdf .tpv-password { max-width: 440px; margin: 48px auto; color: #36443f; text-align: center; padding: 20px; }
.trhuah-pdf .tpv-error p, .trhuah-pdf .tpv-password p { margin: 0 0 16px; font: inherit; }
.trhuah-pdf .tpv-error button, .trhuah-pdf .tpv-password button { color: #fff; background: var(--tpv-accent); padding-inline: 16px; }
.trhuah-pdf .tpv-password input[type="password"] { font: inherit; width: 100%; max-width: 220px; min-height: 40px; padding: 8px 10px; border: 1px solid #bac7c0; background: #fff; border-radius: 4px; color: #273331; margin: 0 8px 12px 0; }
.tpv-empty { border: 1px dashed #bac7c0; padding: 40px 24px; text-align: center; color: #53645d; background: #f5f7f4; font: 14px/1.8 sans-serif; }
.trhuah-pdf:fullscreen, .trhuah-pdf.is-expanded { width: 100%; height: 100%; display: flex; flex-direction: column; border: 0; border-radius: 0; margin: 0; background: #fff; }
.trhuah-pdf.is-expanded { position: fixed; inset: 0; z-index: 2147483646; }
.trhuah-pdf:fullscreen .tpv-viewport, .trhuah-pdf.is-expanded .tpv-viewport { flex: 1; height: auto; min-height: 0; }
.trhuah-pdf:fullscreen .tpv-header, .trhuah-pdf:fullscreen .tpv-toolbar, .trhuah-pdf:fullscreen .tpv-status,
.trhuah-pdf.is-expanded .tpv-header, .trhuah-pdf.is-expanded .tpv-toolbar, .trhuah-pdf.is-expanded .tpv-status { flex: none; }
/* PDF.js text layers preserve selection and readable text alongside the canvas. */
.trhuah-pdf .textLayer { --min-font-size: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size)); position: absolute; text-align: initial; inset: 0; overflow: clip; opacity: 1; line-height: 1; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: #000; z-index: 1; }
.trhuah-pdf .textLayer :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0 0; }
.trhuah-pdf .textLayer > :not(.markedContent), .trhuah-pdf .textLayer .markedContent span:not(.markedContent) { z-index: 1; --font-height: 0; --scale-x: 1; --rotate: 0deg; font-size: calc(var(--text-scale-factor) * var(--font-height)); transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv)); }
.trhuah-pdf .textLayer .markedContent { display: contents; }
.trhuah-pdf .textLayer span[role="img"] { user-select: none; cursor: default; }
.trhuah-pdf .textLayer ::selection { background: #80b5d580; color: transparent; }
@media (max-width: 600px) {
    .trhuah-pdf .tpv-header { padding: 12px; align-items: flex-start; gap: 10px; }
    .trhuah-pdf .tpv-title { font-size: 13px; }
    .trhuah-pdf .tpv-original { font-size: 11px; padding-top: 3px; }
    .trhuah-pdf .tpv-file-actions { flex-direction: column; align-items: flex-end; gap: 0; max-width: 120px; }
    .trhuah-pdf .tpv-toolbar { justify-content: center; gap: 2px 10px; padding: 6px 8px; }
    .trhuah-pdf .tpv-pagination, .trhuah-pdf .tpv-tools { justify-content: center; gap: 2px; }
    .trhuah-pdf button { min-width: 44px; min-height: 44px; padding: 9px 7px; font-size: 12px; }
    .trhuah-pdf .tpv-status { padding: 7px 12px; }
}
@media (prefers-reduced-motion: reduce) { .trhuah-pdf button { transition: none; } }
