html.material-image-open { overflow: hidden; }
dialog.material-image-viewer { position: fixed; inset: 0; box-sizing: border-box; width: 100%; max-width: none; height: 100dvh; max-height: none; margin: 0; padding: 0; border: 0; border-radius: 0; background: #f0eee5; color: #173e2b; }
dialog.material-image-viewer[open] { display: flex; flex-direction: column; }
.material-image-viewer::backdrop { background: #173e2b; }
.material-image-toolbar { box-sizing: border-box; width: 100%; height: auto; min-height: 0; margin: 0; display: flex; flex: 0 0 auto; justify-content: space-between; align-items: center; gap: 16px; padding: 14px clamp(16px, 4vw, 48px); border-bottom: 1px solid #dce2d4; background: #fffefb; font: 600 14px/1.5 Arial, sans-serif; }
.material-image-toolbar button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid #cddac6; border-radius: 24px; background: #fffefb; color: #173e2b; font: 700 14px/1.4 Arial, sans-serif; cursor: pointer; }
.material-image-toolbar button:hover { background: #173e2b; color: white; }
.material-image-toolbar button:focus-visible { outline: 3px solid #9bac78; outline-offset: 3px; }
.material-image-canvas { flex: 1; min-height: 0; overflow: auto; padding: clamp(12px, 3vw, 32px); text-align: center; }
.material-image-canvas img { display: block; width: auto; max-width: 100%; height: auto; margin: 0 auto; box-shadow: 0 4px 24px #173e2b15; }
.material-image-canvas p { font: 16px/1.6 Arial, sans-serif; }
@media (max-width: 480px) { .material-image-toolbar > span { font-size: 12px; } }
