.gz-dialog { width: min(1180px, calc(100% - 48px)); height: min(940px, calc(100dvh - 48px)); max-width: none; max-height: none; margin: auto; padding: 0; border: 0; border-radius: 10px; overflow: hidden; background: var(--paper-light); color: var(--ink); }
.gz-dialog[open] { display: flex; flex-direction: column; }
.gz-dialog [hidden] { display: none !important; }
.gz-dialog::backdrop { background: #102a1ed9; backdrop-filter: blur(5px); }
.gz-header { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 17px 22px; border-bottom: 1px solid var(--line); }
.gz-header p { margin: 0 0 5px; font-size: 9px; font-weight: 650; letter-spacing: .12em; color: var(--muted); }
.gz-header h2 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.02em; }
.gz-dialog button { color: inherit; touch-action: manipulation; }
.gz-close { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; font-size: 28px; line-height: 1; }
.gz-stage { flex: 1 1 auto; min-width: 0; min-height: 0; overflow: auto; background: var(--product-bg); overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #183e2b55 transparent; }
.gz-stage:focus-visible { outline: 2px solid var(--red); outline-offset: -4px; }
.gz-stage.is-zoomed { cursor: grab; }
.gz-stage.is-dragging { cursor: grabbing; }
.gz-canvas { display: grid; place-items: center; }
.gz-visual { max-width: none; flex-shrink: 0; }
.gz-visual img { user-select: none; -webkit-user-select: none; pointer-events: none; }
.gz-footer { flex: 0 0 auto; padding: 13px 22px 15px; border-top: 1px solid var(--line); }
.gz-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 10px 20px; flex-wrap: wrap; }
.gz-controls { display: flex; align-items: center; gap: 5px; }
.gz-controls button { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 10px; border: 1px solid var(--line); border-radius: 5px; background: transparent; font-size: 23px; }
.gz-controls button:hover, .gz-close:hover { background: var(--paper); }
.gz-controls button:disabled { opacity: .35; cursor: default; }
.gz-controls output { min-width: 65px; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.gz-controls .gz-reset { margin-left: 7px; font-size: 12px; padding-inline: 14px; }
.gz-logo-button { display: inline-flex; align-items: center; gap: 15px; min-height: 44px; padding: 8px 0; border: 0; background: transparent; font-size: 12px; font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.gz-logo-button span { font-size: 17px; font-weight: 400; }
.gz-footer p { margin: 9px 0 0; font-size: 11px; line-height: 1.6; color: var(--muted); }
.gz-footer #gz-note { margin-top: 4px; font-size: 10px; }
@media (max-width: 760px) {
  .gz-dialog { width: 100%; height: 100dvh; margin: 0; border-radius: 0; }
  .gz-header { padding: max(12px, env(safe-area-inset-top)) 16px 12px; gap: 12px; }
  .gz-header h2 { font-size: 15px; }
  .gz-header p { font-size: 8px; }
  .gz-footer { padding: 11px 16px max(13px, env(safe-area-inset-bottom)); }
  .gz-toolbar { gap: 0 15px; }
  .gz-footer p { font-size: 11px; }
  .gz-logo-button { font-size: 11px; }
}
@media (max-height: 500px) {
  .gz-header { padding-block: 7px; }
  .gz-header p, #gz-help { display: none; }
  .gz-footer { padding-block: 6px; }
  .gz-footer #gz-note { font-size: 9px; }
}
@media (prefers-reduced-motion: reduce) {
  .gz-dialog, .gz-dialog * { animation: none !important; transition: none !important; scroll-behavior: auto; }
}
