/* OKKwork — overlay/modal viewport fit only.
   Do not target the app shell: .Pixso-frame-219_2 is a 1920px canvas
   scaled with --okkwork-scale (100vw / 1920). max-width:100% on that
   frame double-shrinks the layout and leaves a side gutter. */

:root {
  --okk-vvh: 100dvh;
  --okk-vvw: 100%;
  --okk-vv-scale: 1;
}

@supports (height: 100svh) {
  :root {
    --okk-vvh: 100svh;
  }
}

/* Flex items default min-height:auto, which clips instead of scrolling. */
.tu-dialog,
.tu-body,
.tu-card-wrap,
.tu-card,
.tu-card__inner {
  min-height: 0;
}

/* Overlays: visible viewport, not classic 100vh (Safari chrome / OS zoom). */
.tu-overlay,
.okkwork-trial-overlay,
.okkwork-stage1-confirm,
.okkwork-stage2-confirm,
.okkwork-stage4-confirm,
.okkwork-logout-confirm__backdrop,
#okkwork-mkk-break-overlay,
.okkwork-modal,
.okkwork-modal-overlay {
  max-height: 100%;
  max-height: 100dvh;
  max-height: var(--okk-vvh, 100dvh);
}

.tu-dialog,
.okkwork-trial-dialog,
.okkwork-stage1-confirm__panel,
.okkwork-stage2-confirm__panel,
.okkwork-stage4-confirm__panel,
.okkwork-logout-confirm,
.okkwork-org-dialog,
.okkwork-org-dialog__panel {
  max-width: min(100%, var(--okk-vvw, 100%));
  max-height: min(100dvh, var(--okk-vvh, 100dvh));
}

.okkwork-org-dialog {
  max-height: calc(var(--okk-vvh, 100dvh) - 32px);
}

.okkwork-org-dialog__panel {
  max-height: min(80dvh, calc(var(--okk-vvh, 100dvh) - 48px), 680px);
}

@media (max-height: 700px) {
  .okkwork-trial-dialog,
  .okkwork-stage1-confirm__panel,
  .okkwork-stage2-confirm__panel,
  .okkwork-stage4-confirm__panel {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
}
