/* v46 — Resume-Now style first template page: centered, full-page previews, normal vertical scroll */
@media (min-width: 901px) {
  body.template-chooser-active {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    background: #fff !important;
  }

  body.template-chooser-active .workspace.start-mode {
    width: min(1180px, calc(100% - 96px)) !important;
    max-width: 1180px !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 auto 48px !important;
    overflow: visible !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: #fff !important;
  }

  body.template-chooser-active .workspace.start-mode .editor,
  body.template-chooser-active .wizard-panel[data-step="0"],
  body.template-chooser-active .wizard-panel[data-step="0"] > .fields {
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: block !important;
  }

  body.template-chooser-active .workspace.start-mode .editor {
    padding: 20px 0 0 !important;
  }

  body.template-chooser-active .template-welcome {
    position: static !important;
    text-align: center !important;
    padding: 8px 20px 18px !important;
    margin: 0 auto 16px !important;
    border-bottom: 1px solid #e1e7ee !important;
    background: #fff !important;
  }

  body.template-chooser-active .template-welcome h1 {
    font-size: clamp(34px, 4vw, 54px) !important;
    line-height: 1.05 !important;
    margin: 5px 0 12px !important;
  }

  body.template-chooser-active .template-welcome p {
    max-width: 820px !important;
    margin: 4px auto !important;
    font-size: 15px !important;
    line-height: 1.45 !important;
  }

  body.template-chooser-active .template-quickbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 60 !important;
    margin: 0 0 22px !important;
    padding: 12px 14px !important;
    border: 1px solid #d9e1ea !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 4px 14px rgba(20,44,68,.08) !important;
    backdrop-filter: blur(8px);
  }

  body.template-chooser-active .template-gallery {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 28px !important;
    width: 100% !important;
    margin: 0 auto !important;
    padding: 0 8px 36px !important;
    overflow: visible !important;
    max-height: none !important;
    align-items: start !important;
  }

  body.template-chooser-active .template-card {
    width: 100% !important;
    min-width: 0 !important;
    padding: 12px !important;
    border-radius: 10px !important;
    background: #fff !important;
    box-shadow: 0 4px 13px rgba(20,44,68,.10) !important;
    overflow: visible !important;
  }

  body.template-chooser-active .template-card .mini-paper {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 210 / 297 !important;
    overflow: hidden !important;
    background: #fff !important;
    border: 1px solid #d7e0e8 !important;
    border-radius: 2px !important;
  }

  body.template-chooser-active .template-card .mini-live-stage {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    overflow: hidden !important;
  }

  body.template-chooser-active .template-card > strong {
    display: block !important;
    margin: 11px 0 4px !important;
    font-size: 15px !important;
    line-height: 1.2 !important;
  }

  body.template-chooser-active .template-card > small {
    display: block !important;
    min-height: 0 !important;
    margin-bottom: 2px !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
  }

  /* Do not turn the chooser into an internal scroll box. */
  body.template-chooser-active .wizard-footer {
    position: static !important;
    margin-top: 16px !important;
    padding-top: 14px !important;
    border-top: 1px solid #e1e7ee !important;
    background: #fff !important;
  }
}

@media (min-width: 901px) and (max-width: 1120px) {
  body.template-chooser-active .workspace.start-mode {
    width: min(980px, calc(100% - 56px)) !important;
  }
  body.template-chooser-active .template-gallery {
    gap: 20px !important;
  }
}

@media (max-width: 900px) {
  body.template-chooser-active .template-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    overflow: visible !important;
    max-height: none !important;
  }
}

@media (max-width: 620px) {
  body.template-chooser-active .template-gallery {
    grid-template-columns: 1fr !important;
  }
}
