/* Version movil de generadores (295) y galerias (295 + 12 sueltos). Todo bajo max-width:700px. */

/* ============ GALERIAS (catalogo) ============ */
@media (max-width:700px){
  body .ckg-page:has(.ckg-filters){margin:4px auto 20px;padding:12px 8px 96px;border-radius:14px}
  body .ckg-page:has(.ckg-filters) .ckg-breadcrumb{margin-bottom:10px;font-size:11px}
  body .ckg-page:has(.ckg-filters) .ckg-heading{gap:10px;margin-bottom:12px}
  body .ckg-page:has(.ckg-filters) .ckg-heading h1{font-size:24px;line-height:1.12}
  body .ckg-page:has(.ckg-filters) .ckg-heading p{display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;font-size:12.5px;line-height:1.4}
  body .ckg-page:has(.ckg-filters) .ckg-heading>.ckg-create{width:100%;min-height:44px;justify-content:center}
  body .ckg-page:has(.ckg-filters) .ckg-tabs{gap:16px;margin-bottom:12px;overflow-x:auto;white-space:nowrap;scrollbar-width:none}
  body .ckg-page:has(.ckg-filters) .ckg-tab{font-size:12px;padding-bottom:9px}
  body .ckg-page:has(.ckg-filters) .ckg-search input{font-size:16px;min-height:44px}
  body .ckg-page:has(.ckg-filters) .ckg-search-submit{min-height:34px;padding:0 12px;font-size:12px}
  body .ckg-page:has(.ckg-filters) .ckg-filter-grid,body .ckg-page:has(.ckg-filters) .ckg-filter-grid.ckg-simple-filters{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
  body .ckg-page:has(.ckg-filters) .ckg-select{font-size:14px;min-height:44px;padding-left:32px;padding-right:26px}
  body .ckg-page:has(.ckg-filters) .ckg-select-wrap>.ckg-svg{left:9px;width:16px}
  body .ckg-page:has(.ckg-filters) .ckg-toolbar{margin-top:14px;align-items:center}
  body .ckg-page:has(.ckg-filters) .ckg-sort{width:auto;min-width:130px}
  body .ckg-page:has(.ckg-filters) .ckg-sort .ckg-select{font-size:13px;padding-left:10px}
  body .ckg-page:has(.ckg-filters) .ckg-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  body .ckg-page:has(.ckg-filters) .ckg-cover{aspect-ratio:3/4!important}
  body .ckg-page:has(.ckg-filters) .ckg-card{border-radius:14px}
  body .ckg-page:has(.ckg-filters) .ckg-card-body{padding:8px 9px 10px!important}
  body .ckg-page:has(.ckg-filters) .ckg-title-row{gap:4px;align-items:flex-start}
  body .ckg-page:has(.ckg-filters) .ckg-card-title{font-size:13px!important;line-height:1.25!important;min-height:0!important;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body .ckg-page:has(.ckg-filters) .ckg-card-meta{font-size:10px!important;line-height:1.3;margin:3px 0 6px;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
  body .ckg-page:has(.ckg-filters) .ckg-view{font-size:11.5px!important}
  body .ckg-page:has(.ckg-filters) .ckg-save{width:30px;height:30px;flex:0 0 30px}
  body .ckg-page:has(.ckg-filters) .ckg-pagination{flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;padding-bottom:6px;scrollbar-width:none}
  body .ckg-page:has(.ckg-filters) .ckg-page-link,body .ckg-page:has(.ckg-filters) .ckg-page-disabled{flex:0 0 auto;min-width:36px;min-height:36px;display:inline-flex;align-items:center;justify-content:center}
  body .ckg-page:has(.ckg-filters) .ckg-help summary{min-height:44px}
}
@media (max-width:330px){body .ckg-page:has(.ckg-filters) .ckg-grid{grid-template-columns:minmax(0,1fr)!important}}

/* ============ GENERADORES (283 formatos + 12 sueltos) ============ */
@media (max-width:700px){
  body .ckg-page.ck-generator-studio,body .ckg-page.ck-gs-skin,body .ckg-page.ckgb-host{margin:4px auto 20px!important;padding:8px 8px 24px!important;border-radius:14px!important}
  /* el sitio (.ckgb-host > *) suma 18px laterales a cada bloque: en movil se anulan */
  body .ckg-page.ckgb-host>:not(.ckgb):not(style):not(script){margin-left:0!important;margin-right:0!important}
  body .ckg-page .cgs-breadcrumb{margin:0 0 10px;font-size:11px;gap:6px}
  body .ckg-page .cgs-heading--hero{flex-direction:column;align-items:stretch;gap:10px;margin:0 0 14px;padding:14px 14px 16px;border-width:3px;border-radius:20px}
  body .ckg-page .cgs-heading--hero>div:first-child,body .ckg-page .cgs-hero-text{flex:0 0 auto!important;min-width:0}
  body .ckg-page .cgs-heading--hero h1{font-size:24px;line-height:1.1;margin:0 0 5px}
  body .ckg-page .cgs-heading--hero p{font-size:12.5px;line-height:1.4;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}
  body .ckg-page .cgs-examples.cgs-examples--hero{width:auto;align-self:flex-start;margin-left:0;min-height:38px;padding:7px 14px;font-size:12px;transform:none}
  body .ckg-page .cgs-workspace,body .ckg-page .cgs-workspace--single{grid-template-columns:minmax(0,1fr)!important;gap:14px}
  body .ckg-page .cgs-form-panel,body .ckg-page>.ckg-card,body .ckg-page>.cgs-workspace>.ckg-card{padding:16px 14px!important;border-radius:14px!important}
  body .ckg-page .cgs-panel-title{font-size:20px;margin:0 0 14px}
  /* campos: 16px evita el zoom automatico de iOS; objetivos tactiles de 44px */
  body .ckg-page .ckg-card input[type=text],body .ckg-page .ckg-card input[type=number],body .ckg-page .ckg-card input[type=search],body .ckg-page .ckg-card input[type=email],body .ckg-page .ckg-card select,body .ckg-page .ckg-card textarea,body .ckg-page.ck-generator-studio .cm-input,body .ckg-page.ck-generator-studio .cm-select,body .ckg-page.ck-generator-studio .cm-textarea{font-size:16px!important;min-height:44px}
  body .ckg-page .ckg-card textarea,body .ckg-page.ck-generator-studio .cm-textarea{min-height:96px}
  body .ckg-page .ckg-label,body .ckg-page.ck-generator-studio .cm-label{font-size:13.5px}
  body .ckg-page .ckg-field,body .ckg-page.ck-generator-studio .cm-field{margin-bottom:15px}
  body .ckg-page .ckg-grid-2,body .ckg-page [class*="-grid-2"],body .ckg-page.ck-generator-studio .cm-row{grid-template-columns:minmax(0,1fr)!important;gap:0}
  body .ckg-page.ck-generator-studio .ck-md-format-field{grid-template-columns:minmax(0,1fr)}
  body .ckg-page [class*="-orient-card"],body .ckg-page .ckg-choice,body .ckg-page.ck-generator-studio .cm-choice{min-height:46px!important}
  body .ckg-page [class*="-choice-group"],body .ckg-page [class*="-choice-grid"],body .ckg-page [class*="-orientation-group"],body .ckg-page.ck-generator-studio .cm-choice-grid{gap:8px}
  body .ckg-page [class*="-stepper"] button,body .ckg-page .cgs-step{min-width:44px;width:44px!important;height:44px!important}
  body .ckg-page [class*="-stepper"] input[type=number],body .ckg-page.ck-generator-studio #mg-quantity{height:44px!important}
  /* boton generar fijo abajo, dejando libre el boton de chat de la derecha */
  body .ckg-page.ck-generator-studio .cgs-submit-row{position:sticky;bottom:0;z-index:30;margin:12px -14px -16px;padding:10px 76px 12px 14px;background:linear-gradient(180deg,rgba(255,255,255,0),#fff 28%);border-top:0;border-radius:0 0 14px 14px;gap:10px}
  body .ckg-page.ck-generator-studio .cm-cost-banner{font-size:12.5px;flex:0 0 auto}
  body .ckg-page.ck-generator-studio .cm-submit{flex:1 1 auto;min-height:48px;box-shadow:0 6px 14px #d6007440}
  body .ckg-page.ck-gs-skin form .ckg-submit{position:sticky;bottom:12px;z-index:30;width:calc(100% - 70px)!important;min-width:0;min-height:48px;margin:12px 0 0!important;box-shadow:0 6px 14px #d6007440!important}
  body .ckg-page.ck-gs-skin form .ckg-cost-banner{margin:10px 0 0}
  /* panel de ejemplo: compacto */
  body .ckg-page .cgs-preview{position:static;padding:14px 12px}
  body .ckg-page .cgs-preview h2{font-size:19px;margin-bottom:12px}
  body .ckg-page .cgs-preview-image{max-height:420px}
  body .ckg-page .cgs-no-preview{min-height:180px}
  body .ckg-page .cgs-form-ads{margin-top:14px}

  /* Examenes (y formularios con paneles propios): se aplanan las capas para ganar ancho */
  body .ckg-page.ck-gs-wide>.cgs-workspace>.ckg-card{padding:0!important;border:0!important;background:transparent!important;box-shadow:none!important}
  body .ckg-page.ck-gs-wide .cgs-panel-title{margin:0 0 10px 2px}
  body .ckg-page [class*="-design-section"],body .ckg-page [class*="-summary-card"],body .ckg-page [class*="-options-panel"]{padding-left:14px!important;padding-right:14px!important}
  body .ckg-page [class*="-essential-context"]{gap:10px}

  html body .ckg-page.ckg-page.ckgb-host{margin-left:3px!important;margin-right:3px!important;width:auto!important;max-width:none!important}
}
