.efoto-document-stage {
    width: min(1100px, 100%);
    height: clamp(350px, 64vh, 690px);
    margin: 0 auto;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(213, 183, 105, .45);
    border-radius: 16px;
    background: #0a2920;
    color: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, .2);
}

/* Bilingual labels and display preferences keep keyboard and touch controls readable. */
.efoto-document-toolbar button,.efoto-pdf-password button,.efoto-pdf-page-control input,.efoto-pdf-password input{min-height:44px;min-width:44px}.efoto-document-stage.is-image{display:flex;flex-direction:column}.efoto-document-stage.is-image .efoto-document-image{height:auto;flex:1;min-height:0}.efoto-document-toolbar{flex-shrink:0}.efoto-pdf-page{display:flex;flex-direction:column;height:100dvh}.efoto-pdf-shell{height:auto;flex:1;min-height:0}.efoto-ui-viewer-header{padding:6px 12px;flex-shrink:0;background:#0e3b2e}.efoto-pdf-text summary{min-height:44px;box-sizing:border-box;padding-block:10px}
.efoto-document-stage[hidden], .efoto-document-stage [hidden], .efoto-pdf-page [hidden] { display: none !important; }
.efoto-document-frame, .efoto-document-image { width: 100%; height: 100%; border: 0; display: block; }
.efoto-document-stage.is-image .efoto-document-image { height: calc(100% - 52px); }
.efoto-document-toolbar {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 52px;
    padding: 8px 12px;
    box-sizing: border-box;
    background: #0e3b2e;
    color: #fff;
    font: 14px/1.4 system-ui, sans-serif;
}
.efoto-document-toolbar button, .efoto-pdf-password button {
    min-width: 38px;
    min-height: 36px;
    border: 1px solid rgba(213, 183, 105, .5);
    border-radius: 8px;
    padding: 6px 10px;
    background: #174d3c;
    color: #fff;
    font: inherit;
    cursor: pointer;
}
.efoto-document-toolbar button:hover:not(:disabled) { background: #28634e; }
.efoto-document-toolbar button:disabled { opacity: .45; cursor: default; }
.efoto-document-toolbar button:focus-visible, .efoto-pdf-page input:focus-visible, .efoto-document-image:focus-visible, .efoto-pdf-scroll:focus-visible {
    outline: 3px solid #e2c675;
    outline-offset: -3px;
}
.efoto-document-toolbar-divider { width: 1px; height: 24px; background: rgba(213, 183, 105, .4); margin: 0 4px; }
.efoto-document-hint { color: #dfd7be; font-size: 12px; margin-left: 8px; }
.efoto-document-status {
    position: absolute;
    left: 50%;
    top: 70px;
    transform: translateX(-50%);
    max-width: calc(100% - 40px);
    padding: 10px 16px;
    border-radius: 10px;
    background: #0e3b2e;
    color: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
    text-align: center;
    font: 14px/1.5 system-ui, sans-serif;
    z-index: 5;
    pointer-events: none;
}
.efoto-document-status.is-error { background: #793b28; }
.efoto-pdf-page { margin: 0; height: 100vh; overflow: hidden; background: #e5e9e5; font: 14px/1.5 system-ui, sans-serif; }
.efoto-pdf-shell { height: 100%; display: flex; flex-direction: column; position: relative; }
.efoto-pdf-page-control { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.efoto-pdf-page-control input { width: 54px; min-height: 32px; padding: 2px 4px; border: 1px solid #c0ab69; border-radius: 6px; text-align: center; font: inherit; box-sizing: border-box; }
.efoto-pdf-scroll { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.efoto-pdf-surface { width: max-content; min-width: 100%; display: flex; justify-content: center; padding: 20px; box-sizing: border-box; }
.efoto-pdf-surface canvas { background: #fff; box-shadow: 0 3px 16px rgba(0, 0, 0, .16); }
.efoto-pdf-password { position: absolute; top: 120px; left: 50%; transform: translateX(-50%); display: grid; gap: 10px; width: min(300px, calc(100% - 48px)); padding: 20px; background: #fff; border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }
.efoto-pdf-password input { min-height: 36px; border: 1px solid #a2b5ab; border-radius: 6px; padding: 4px 8px; font: inherit; }
.efoto-pdf-text { max-height: 25vh; overflow: auto; padding: 8px 16px; border-top: 1px solid #b6c4bd; background: #f4f6f3; color: #163f30; }
.efoto-pdf-text summary { cursor: pointer; font-weight: 600; }
.efoto-pdf-text p { white-space: pre-wrap; margin: 10px 0; }
@media (max-width: 600px) {
    .efoto-document-stage { height: 60vh; min-height: 340px; border-radius: 10px; }
    .efoto-document-hint, .efoto-document-toolbar-divider { display: none; }
    .efoto-document-toolbar { gap: 5px; padding: 6px; font-size: 12px; }
    .efoto-document-toolbar button { padding: 6px 8px; }
    .efoto-pdf-surface { padding: 12px; }
}
